Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotLottie Player Component Disappears on Window Resize in Nuxt3 #289

Open
patratel opened this issue Jan 7, 2024 · 2 comments
Open

dotLottie Player Component Disappears on Window Resize in Nuxt3 #289

patratel opened this issue Jan 7, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@patratel
Copy link

patratel commented Jan 7, 2024

I'm facing an issue in a Nuxt3 project where a dotLottie player component disappears whenever I resize the browser window. This issue occurs in a setup where I'm using GSAP for animating elements, including the dotLottie-player container.

The dotLottie-player works fine initially, but as soon as I resize the window, it disappears and doesn't reappear unless I reload the page. Upon inspection of the dotLottie-player the previously rendered element has disappeared after resizing the window.

I'm using GSAP with the ScrollTrigger plugin to pin the container of this dotLottie-player element to the top of the page. Using lottie-interactivity library the lottie gets animated on the user's scroll.

I know this issue is somehow related to GSAP , because if i remove it the resize bug disappears.

Has anyone encountered a similar issue or can provide insight into why the dotLottie player disappears on window resize when using GSAP? Any suggestions on how to troubleshoot or fix this problem would be greatly appreciated.

@afsalz
Copy link
Contributor

afsalz commented Jan 19, 2024

Hi @patratel, could you reproduce the issue you're encountering in a CodeSandbox and share the link with us? It would really help us get a better understanding of the problem. Thanks!

@afsalz afsalz self-assigned this Jan 19, 2024
@afsalz afsalz added the question Further information is requested label Jan 19, 2024
@stefankempf
Copy link

stefankempf commented May 29, 2024

I'm encountering the same issue, the player is empty on window resize.

Screenshot von 2024 05 29 um 10 58 30

important: the issue is only happening, when gsap scrolltrigger pin option is activated and the lottie animatino is getting wrapped into another div.pin-spacer

I have tried to recreate the issue in a code sandbox. I couldn't get it to work, codesandbox is crashing when importing the player-component. nevertheless, here is the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants