-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Transition out
leaves invisible elements in the DOM after reassignment
#6150
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
I can confirm this bug. Tested a bit around and this happens when you modify during transition. See also #6152 |
I also can confirm this bug. It's actually layout-breaking because the "empty" leftover nodes are still getting counted as child elements in my grid layout. You can also repeat this infinitely to get many more leftover nodes if you can trigger the unmount/destroy before the transition finishes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed as it was previously marked as stale and saw no subsequent activity. |
. |
(At least partially) fixes sveltejs/svelte#6150
Describe the bug
The bug comes out then I use the
out:<any_svelte_transition>
in a list of items ({#each}...{/each}
).When I reassign the array that I loop through with
each
and the data comes from aPromise
and the data 'arrives' earlier then theout
animation finishes, the previous data won't get removed from the DOM, it's going to be hidden, but it takes up the space unnecessarily.To Reproduce
To reproduce try the example in this repl: https://svelte.dev/repl/7163b83de9b74b7b9d2a84560b73f6bd?version=3.36.0
Expected behavior
The items should disappear from the dom also and should not take up the space.
Severity
Somewhat annoying when trying to filter an array of products and want to do it with a smooth animation.
The text was updated successfully, but these errors were encountered: