-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte 5: flip
reordering causes duplication and glitches
#9805
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
Comments
flip
reordering is causes duplication and glitches
@trueadm The duplications are gone, but the animation seems to still be off. (Or is there another fix for that which is not included here?) |
I'm working on another PR for the animation bug. I was more addressing the duplicated content. |
@brunnerh Unfortunately, the current system for reconciling each blocks doesn't try to reverse previous transitions. I couldn't make it work this way with signals and how various parts of the reconciliation system work. So you'll see slightly glitchy behavior right now doing what you do. I'm unsure if this will ever be something we can solve. |
flip
reordering is causes duplication and glitchesflip
reordering causes duplication and glitches
I want to reopen this issue, the animation glitch is still there (see the REPLs in the issue). |
Describe the bug
Using
animate:flip
in an#each
and completely reordering the list causes duplicated items and a broken animation (elements leaving the bounds of the list and such).When moving one item to the other end of the list at a time, the animation disappears after having moved all of them. Also, only one item is animated even though all items have to move and thus should be animated.
Not sure how this relates to #9655, which also uses transitions. If this is just a special case, feel free to close this as duplicate.
Reproduction
Svelte 4
Svelte 5
Tried a more simple example where one item gets moved from start of list to the end:
REPL
Here the animation disappears after cycling through the list once.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: