astronaut954 Posted February 3 Posted February 3 For some reason, my parallax scroll is getting a strange bug that will make all the scroll elements mess up (blank spaces, not finishing the animation, overlapping and so on) in 2 scenarios: - Changing the page size and not reloading the page; - Quickly scrolling (as far as I was able to investigate it will happen when the content is still loading, but I'm not completely sure about this information); The first scenario isn't a big deal (but if it isn't that hard I would like to fix it) since you don't expect the user to do it. Yet the second scenario is something I need to fix because it directly affects the user experience. Any idea about what is happening and the alternatives? See the Pen azdqgpX by Ramoses-Hofmeister-Ferreira (@Ramoses-Hofmeister-Ferreira) on CodePen.
Solution GreenSock Posted February 3 Solution Posted February 3 I see two problems: You've got scroll-behavior: smooth (that's like applying a CSS transition to something animated with GSAP - the browser basically refuses to set values immediately, so when GSAP recalculates positions and temporarily sets the scroll position to 0 invisibly, the browser is like "NOPE!"). You're using a pretty old version of GSAP. I'd strongly recommend updating to the latest version (3.14.2 right now). 1
astronaut954 Posted February 3 Author Posted February 3 42 minutes ago, GreenSock said: I see two problems: You've got scroll-behavior: smooth (that's like applying a CSS transition to something animated with GSAP - the browser basically refuses to set values immediately, so when GSAP recalculates positions and temporarily sets the scroll position to 0 invisibly, the browser is like "NOPE!"). You're using a pretty old version of GSAP. I'd strongly recommend updating to the latest version (3.14.2 right now). Thank you so much! That was much simpler than I thought 😅 1
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