-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Elements (components) with transition overlap each other in an each block using flip animation #4910
Comments
You likely need to use deferred transitions https://svelte.dev/tutorial/deferred-transitions. |
Any feedback on this? Here is a simpler example: https://svelte.dev/repl/9a81a545111b475f86639dafcd8f35a5?version=3.24.1 Just double click the button. Result: elements overlapping, flip animation not pushing down the 2nd element. Edit: I changed the duration of the animations to 2 seconds, meaning it is not even necessary to click the button "that fast". The key is to click it the second time WHILE the first animations are running. |
I'm encountering the same issue. Is anyone aware of a workaround? Edit: Interestingly the issue only happen with the |
Possibly related to #5808. |
This is still an issue. Any updates about this? My workaround was to delay the animation until the previous one has fixed wherever it was buggy. I had a list that varied in size, and so when I decreased the list size and increased it too soon, I would get the overlap. I simply delayed the increase in list size until the animation had completed. |
I'm also running into this bug. I have an |
Same here, I made a workaround that I think is a bit better than delays (delays where not working for me , and are pretty random imo). Here it is : https://svelte.dev/repl/63bb44e18284450388bad41fc0df7c6c?version=3.44.1 Another problem is how transitions work. There is no way to dynamically modify the behaviour in the outro, if the animation is called with transition:fly. I think this is because svelte is using the css function for all outros instead of calling the transition function again. So you need to have in:customFlyIn and out:customFlyOut. In the mean time, I hope this helps. |
@legowhales you're nuts, I know this is like 3 years after but thanks man! It went from this: I wonder why is not included in the default API for Repro: https://svelte.dev/repl/4d641551906e4b82a893918bb43fd6d3?version=4.2.12 |
Fixed in Svelte 5 |
Issue: When an each block which has
animation:flip
set contains items which havetransition:xyz
set and this each block is updated (e.g. some items removed), the items may not get the correct position if the update occurs while the previous transitions are running.REPL: https://svelte.dev/repl/324c3d19fe1b4648919af7b2eef7e4f3?version=3.22.3
Steps to reproduce: click the button quickly 2-3 times, (or change the input field's value while the list is animating).
Result: Some elements overlap each other, breaking the order.
The text was updated successfully, but these errors were encountered: