Refreshing the page while scrolling breaks certain elements #3643
Unanswered
jakobpevec
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I'm just starting with Svelte and SvelteKit and have a weird lifecycle issue:
I'm using Gsap ScrollTrigger to animate a background SVG element. On first page load the animation will flow correctly. But if you scroll down the page and then refresh and keep scrolling during refresh, it will break the animation.
The reason being is that SVG path's bounding box becomes 0 height and 0 width at the start of onMount event.
Here is an example of what I'm talking about, first scroll is correct, after refresh it's incorrect: https://youtu.be/5_tyk28Txg0
Any ideas what's happening? In gsap's forum they suggested it's probably an issue with the lifecycle event
Beta Was this translation helpful? Give feedback.
All reactions