Closed pgirzalsky closed 1 month ago
Just scrolled and navigated around and couldn't repro your problem(iPhone 15, iOS 17.5). Maybe you can share a navigation sequence which triggers it.
P.S. You got some horizontal overflow on "Unternehmen" page.
Thanks for the quick response and catching a bug! Fixed that at least. I will try to reproduce the scrolling behaviour on other devices and check-in again.
I had the same problem using Lenis with ScrollTrigger and what worked for me was removing this ScrollTrigger.normalizeScroll(true);
fixed?
I didn't have this line in my code before but ADDING it actually fixes my problem. Though I feel like the scrolling behaviour feels different now. Is there any direction you can point me so I can try to debug this problem or is it something I would have to discuss with the GSAP team?
By default Lenis doesn't affect touch events unless you enable syncTouch
. Does it scroll correctly if you remove Lenis ?
Well, it seems you're right and Lenis is not the issue. I just removed it again and it's still happening. I was so sure to have tested it without Lenis before creating this issue... Maybe I got confused in my versions.
It seems I have found the culprit now though. I have a function that refreshes the ScrollTrigger every time an image is being lazy loaded:
Webflow.push(function () { const lazyImages = $("img[loading='lazy']"); lazyImages.each(function () { $(this).on("load", function () { ScrollTrigger.refresh(); }); }); });
Removing the ScrollTrigger.refresh();
fixes my issue. Now I just have to see how I fix recalculating the start/end positions of my triggers when the images finished loading since it changes the DOM height...
I'm using Lenis on this website: https://habdank-2-0.webflow.io/
On mobile the scrolling stops abruptly and seemingly randomly (only seems to be happening on real mobile devices. Tested in iPhone 13, iOS 17.5.1).