lit-transition
lit-transition copied to clipboard
DOM ends up replicating ...
Thank you for this super simple and comprehensive way to make transitions work smoothly for Lit components, including the great documentation. Very slick!
I'm using lit-transition
to fade a menu in/out. It works great. Occasionally, for reasons I don't know/understand, the menu in question appears to "replicate" rather than animate. That is, the contents of my template end up being reproduced and added a second time to the DOM, then I open the menu again, the contents of the template are added a third time. Then fourth, then fifth, etc. I can see this DOM expanding in Chrome Developer tools.
A reload fixes the issue, and it goes back to modifying the DOM 'in-place' (the animations work beautifully, and I can see the animation updating the DOM in Chrome developer tools).
Nevertheless, it happens again later for unclear reasons. If I remove the call to transition()
this replication never happens, so the issue is either some way I am using lit-transition
or some issue with it.
Any hints on what might cause this?
You can find the code in question here .
Screenshot of endless template copies:
Thanks again!