You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The crossfade transition will play the fallback animation in some scenarios, when using svelte 5. There seems to be some pattern to this, but I haven't figured it out entirely.
It looks like (to me) it has something to do with the order of which the parent elements are in the DOM. Reordering these elements changes the behavior as well. I have provided some more details in the REPL.
Reproduction
I initially ran into this in a sveltekit project using svelte 5. The outer elements are an array of objects with their inner elements as an array within.
This is a REPL that reproduces the exact setup I have there as closely as possible. I am not able to provide a svelte 4 REPL at this moment, but I can later if there's a need for it.
The text was updated successfully, but these errors were encountered:
Draconizations
changed the title
Crossfade playing fallback consistently in some scenarios
Svelte 5: Crossfade playing fallback consistently in some scenarios
Apr 29, 2024
Here is a simpler REPL in Svelte 4 and Svelte 5 using the exact code (so no runes).
What's interesting is that the "receiver" that appears first in the DOM sends the items without the animation. You can observe this when you swap the order in the DOM (Team A after Team B from the REPL).
I stumbled upon this too.
What's interesting is that the "receiver" that appears first in the DOM sends the items without the animation. You can observe this when you swap the order in the DOM (Team A after Team B from the REPL).
Thanks for the simpler REPL with a svelte 4 comparison. I didn't have the time to make one yesterday, so this is much appreciated
I created some repls to file this issue myself, but since it's already been created I guess I will leave them here to see if they are helpful at all: svelte 4 svelte 5 (no runes) svelte 5 (runes)
I've noticed that transitions from left-to-right (forward in the dom order) do not play the animation unless I am able to click the button to trigger that transition while a right-to-left (backwards in dom order) transition is happening.
example: quickly cycle between clicking 1 and 2 -> animation plays in both directions.
click 1, wait for transition to finish, then click 2 -> animation only plays in 1 direction.
Describe the bug
The crossfade transition will play the fallback animation in some scenarios, when using svelte 5. There seems to be some pattern to this, but I haven't figured it out entirely.
It looks like (to me) it has something to do with the order of which the parent elements are in the DOM. Reordering these elements changes the behavior as well. I have provided some more details in the REPL.
Reproduction
I initially ran into this in a sveltekit project using svelte 5. The outer elements are an array of objects with their inner elements as an array within.
This is a REPL that reproduces the exact setup I have there as closely as possible. I am not able to provide a svelte 4 REPL at this moment, but I can later if there's a need for it.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: