Łukasz Posted June 25, 2021 Share Posted June 25, 2021 Hi everyone, my project is built with Next.js. After updating gsap from 3.6.1 to 3.7.0 I encountered a problem with scroll position. Next.js scrolls to top by default after navigation to another page, but that no longer works when I have gsap 3.7.0. New page maintains the scroll position of the previous one. Here are two demos: one that demonstrates the correct behaviour with gsap 3.6.1 https://codesandbox.io/s/gsap-361-38gq7 and another one with the unwanted behaviour with gsap 3.7.0 https://codesandbox.io/s/gsap-370-vzw7s Adding ScrollTrigger.refresh(); which helped in the case linked below, hasn't solved my problem. Any ideas how to bring back the good old behaviour? Thanks a lot! Lukasz 1 Link to comment Share on other sites More sharing options...
Cassie Posted June 25, 2021 Share Posted June 25, 2021 Hi Lukasz, so sorry about this! We'll look into it!@OSUblake @GreenSock 1 Link to comment Share on other sites More sharing options...
OSUblake Posted June 25, 2021 Share Posted June 25, 2021 Thanks for letting us know, and we're investigating it. In the meantime, can you use v 3.6.1? 1 Link to comment Share on other sites More sharing options...
Łukasz Posted June 25, 2021 Author Share Posted June 25, 2021 Yes, I'm using v 3.6.1 for now Link to comment Share on other sites More sharing options...
Solution GreenSock Posted June 30, 2021 Solution Share Posted June 30, 2021 I believe this is fixed in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js If you need a .tgz file (like to npm install), you can get it at https://assets.codepen.io/16327/gsap-beta.tgz Does that work better for you? Please let us know if you notice any other issues. 1 1 Link to comment Share on other sites More sharing options...
Łukasz Posted June 30, 2021 Author Share Posted June 30, 2021 7 hours ago, GreenSock said: I believe this is fixed in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js If you need a .tgz file (like to npm install), you can get it at https://assets.codepen.io/16327/gsap-beta.tgz Does that work better for you? Please let us know if you notice any other issues. After installing the .tgz file the problem is gone. I'll let you know if any other issues come up. Thanks 1 1 Link to comment Share on other sites More sharing options...
Stephane Demotte Posted November 6, 2021 Share Posted November 6, 2021 On 6/30/2021 at 1:07 AM, GreenSock said: I believe this is fixed in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js If you need a .tgz file (like to npm install), you can get it at https://assets.codepen.io/16327/gsap-beta.tgz Does that work better for you? Please let us know if you notice any other issues. Hello, i have the same issue with my vuejs app. How can we choose the version with `"gsap": "npm:@gsap/shockingly"` ? I cannot roll back to `3.6.1` with the bonus files 😕 Do we access to the beta files ? Thank you ! Link to comment Share on other sites More sharing options...
Cassie Posted November 6, 2021 Share Posted November 6, 2021 Hi @Stephane Demotte, We're a few months (and releases) on now. This issue should be fixed now. On 6/30/2021 at 6:07 AM, GreenSock said: I believe this is fixed in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js If you want to choose a specific version and you're using npm - you'll need to change the version in your package.json."gsap": "~3.6.1" Make sure you delete your package-lock.json and run npm install again. I wouldn't recommend this though - if possible make a minimal demo showing the issue and open a new forum thread so we can take a look. You shouldn't be running into issues! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now