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

DOM ends up replicating ... #64

Open
dermotduffy opened this issue Aug 16, 2021 · 0 comments
Open

DOM ends up replicating ... #64

dermotduffy opened this issue Aug 16, 2021 · 0 comments

Comments

@dermotduffy
Copy link

dermotduffy commented Aug 16, 2021

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:

lit-transitions

Thanks again!

dermotduffy added a commit to dermotduffy/frigate-hass-card that referenced this issue Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant