darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.37k stars 317 forks source link

Lenis scroll stops working in webflow project with pagination #184

Closed teresamtz closed 1 year ago

teresamtz commented 1 year ago

Hi,

I'm a designer who has stepped into the no-code world so please bear with me since I'm no coding expert.

I designed and developed the following site a few months ago. For context: At "Producciones" section, which loads a collection list of +170 elements, webflow automatically creates a pagination every 100 elements. But I didn't want a pagination so I implemented finsweet's CMS load attribute to create an infinite scroll. So far so good. Then, I searched multiple options to have a smooth scroll until I found (and fell in love with) Lenis, which I implemented on the site too. And it worked like a charm for a few months up until recently when I observed the problem that is happening now.

As you can see when you scroll down, right at the point where the page has loaded 100 items the scroll stops working and the only way to move further down is to manually drag the scroll bar. It happens on every browser that I've tested, but only on desktop, it doesn't happen on mobile.

When I remove Lenis' script, the infinite scroll works fine again (you can check it here)

What bugs me is that it used to work well for the past 7 months. I didn't update Lenis code nor did any other thing to the website, in fact I only noticed the bug because a friend told me.

Anyone can point me in any possible directions? What I've done for now is removing Lenis but I loved having it on the site and would like to be able to keep it.

Many thanks.

clementroche commented 1 year ago

Hi, see this issue: https://github.com/studio-freight/lenis/issues/182, you must add html {height:auto} to your custom CSS

teresamtz commented 1 year ago

Thanks @clementroche. Actually I realized there was a new version of the script and the issue just disappeared when updating the script src to

In case it helps anyone else.