GSAP ScrollTrigger with Nuxt 3 not working as expected in GSAP Posted December 26, 2022 (I am a Japanese speaker, translated by deepl.) We have confirmed a bug in the execution of ScrollTrigger when pageTransition is set. My solution is one of the following. 1、Do not use pageTransition. 2、Delay the execution of the ScrollTrigger in onMounted longer than the time required for the pageTransition (use setTimeout). 3、Set page-key in the NuxtPage component in app.vue. 4、Set definePageMeta key in each page component. -- postscript -- However, I found that changing the page-key using methods 3 and 4 causes another problem with the pageTransition. I just found another solution! 5. create plugins and use Nuxt's 'page:transition:finish' hook.
GSAP ScrollTrigger with Nuxt 3 not working as expected
in GSAP
Posted
(I am a Japanese speaker, translated by deepl.)
We have confirmed a bug in the execution of ScrollTrigger when pageTransition is set.
My solution is one of the following.
1、Do not use pageTransition.
2、Delay the execution of the ScrollTrigger in onMounted longer than the time required for the pageTransition (use setTimeout).
3、Set page-key in the NuxtPage component in app.vue.
4、Set definePageMeta key in each page component.
-- postscript --
However, I found that changing the page-key using methods 3 and 4 causes another problem with the pageTransition.
I just found another solution!
5. create plugins and use Nuxt's 'page:transition:finish' hook.