LottieFiles / dotlottie-web

Official LottieFiles player for rendering Lottie and dotLottie animations in the web. Supports React, Vue, Svelte, SolidJS and Web Components.
https://developers.lottiefiles.com/docs/dotlottie-player/
MIT License
191 stars 11 forks source link

Moved dotlottie-wc aren't reconnected #308

Closed louisboulagnon closed 3 months ago

louisboulagnon commented 3 months ago

Overview

The DotLottie instance is attached on firstUpdated and destroyed on disconnectedCallback If we move a dotlottie-wc component (e.g. elem.appendChild / elem.replaceChildren / ...), the web component will be disconnected and the DotLottie instance won't be recreated.

Is there a reason i am missing why firstUpdated is used instead of connectedCallback ?

theashraf commented 3 months ago

Hi @louisboulagnon, This is clearly an issue in dotlottie-wc. We will address it in the next release.

louisboulagnon commented 3 months ago

Thank you so much for your quick work @theashraf ! 😀