Jump to content
GreenSock

call007

There is a lag with page scrolling while using ScrollSmoother

Go to solution Solved by GreenSock,

Recommended Posts

Hi everyone,

I've noticed this problem in 3.11.4 version of GSAP. When scrolling a page for the first time you can see the strange jumping of the content (around 15px). You can check it on the demo. Is there a way to fix it?

Thanks

See the Pen eYjzORQ by call007 (@call007) on CodePen

Link to comment
Share on other sites

  • Solution

Thanks for reporting that, @call007! It should be resolved in the next release which I dropped into this fork: 

See the Pen rNrjqWy?editors=1010 by GreenSock (@GreenSock) on CodePen

 

In the meantime, though, you can just add this one line of code to fix 3.11.4:

smoother.scrollTrigger.getTween().resetTo("totalProgress", 0);

(Obviously that entails saving your ScrollSmoother as a variable named "smoother")

 

Better?

 

Sorry about any confusion there!

  • Like 3
Link to comment
Share on other sites

It works fine with this line (and in the demo above) :

smoother.scrollTrigger.getTween().resetTo("totalProgress", 0);

 

Thank you for your help!

Good luck!

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×