CROMA Posted May 20, 2024 Posted May 20, 2024 Hello everyone! We're building a website using GSAP with ScrollTrigger, ScrollTo and ScrollSmoother. We noticed that if you refresh the webpage after scrolling (so not when its on top) the pinned sections completely broke. Here's the website we're building: https://terramata.croma.site/it/ Looks like the page height is not calculated propely after a refresh. Do you have any idea how to fix this? (Tested on CHROME) Thanks!
CROMA Posted May 20, 2024 Author Posted May 20, 2024 Also, testing it on Safari 17.4.1 looks like it's totally broken on it. Do you have any idea why?
Solution CROMA Posted May 20, 2024 Author Solution Posted May 20, 2024 Solved! It was an error with the images, because of the native HTML5 lazy load, GSAP cannot calculate the website height unless you were starting navigating it from the top of the page. 1
GreenSock Posted May 20, 2024 Posted May 20, 2024 Glad you figured it out. By the way, I did create a little helper function that might be useful here: Enjoy!
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