Skip to content
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

Transition + slots + #if #4064

Closed
yazonnile opened this issue Dec 7, 2019 · 5 comments
Closed

Transition + slots + #if #4064

yazonnile opened this issue Dec 7, 2019 · 5 comments

Comments

@yazonnile
Copy link

Describe the bug
If we update state while transition, #if statement inside transition element doesn't work with slots properly

To Reproduce

  1. open REPL example
  2. Click once on TOGGLE button
  3. Slot elements inside element without transition works good. With transition - not
  4. setTimeout just emulates state change close to transition end.

Expected behavior
With and without transition slots should work good

@halfnelson
Copy link
Contributor

I wonder if this is caused by the same problem as
#3685

@yazonnile
Copy link
Author

@halfnelson
looks very similar, agree

@halfnelson
Copy link
Contributor

I can repro without slots
https://svelte.dev/repl/efc4d7292a6549e888c4a0ab98807e61?version=3.16.0

so I feel it is more likely the same problem, local "transition_in" on inner if block "end"ing a global outro which means the "on outro complete" callbacks aren't called which means the destroy is never called on the other part of the if

@halfnelson
Copy link
Contributor

Just tested to see if #4634 fixed it. No such luck, can still reproduce with
https://svelte.dev/repl/efc4d7292a6549e888c4a0ab98807e61?version=3.22.3

@dummdidumm
Copy link
Member

This is fixed in Svelte 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants