-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
If a <svelte:component> tag is used inside of a element with a svelte transition (like in the code below) and the this prop is changed while the transition is playing then the old component will stay mounted alongside the new one.
{#if open}
<div transition:fade>
{#if component}
<svelte:component this={component} />
{/if}
</div>
{/if}Edit: This behavior also seems to occur if a there is a transition inside the component that is provided to the this prop.
Reproduction
To reproduce click the Open button followed by clicking the Confirm buttons.
Only one component should be visible at a time but all components stay mounted.
Remove transition:fade in Container.svelte to get the proper behavior.
Logs
No response
System Info
Linux 5.13.13-arch1-1, Brave Version 1.26.74 Chromium: 91.0.4472.124 (Official Build) (64-bit)Severity
annoyance
abezulski, ganigeorgiev, cascading-jox, OpherV and coleboggus
Metadata
Metadata
Assignees
Labels
No labels