title: Scrolltop animation is not working on IOS
body: <p>I have made a JS effect to increase the line-height of each li of my website while you scroll. It is working nicely on my Macbook and my Android Smartphone but it doesn't on an iPhone. Does someone has a solution ?</p>
  
  <pre><code>function throttled(delay, fn) {
      let lastCall = 0;
      return function(...args) {
        const now = (new Date).getTime();
        if (now - lastCall &lt; delay) {
          return;
        }
        lastCall = now;
        return fn(...args);
      }
    }
  
    const testElement = document.querySelectorAll("li");
    console.log(testElement.offsetTop);
  
    window.addEventListener("scroll", throttled(10, (e) =&gt; {
      for(let i = testElement.length-1;i&gt;=0;i--){
        let posTopElement = (testElement[i].offsetTop)-600;
        if (document.documentElement.scrollTop &gt; posTopElement) {
          window.requestAnimationFrame(function() {
            let minLineHeight = 4;
            let lineHeight = (window.scrollY - posTopElement) * 0.1;
            if (lineHeight &lt; minLineHeight) lineHeight = minLineHeight;
            else if (lineHeight &gt; 36) lineHeight = 36;
            testElement[i].style.lineHeight = lineHeight + "px";
          });
        } 
      }
    }));
  </code></pre>