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

Animation doesn't complete #4464

Closed
kewp opened this issue Feb 25, 2020 · 9 comments
Closed

Animation doesn't complete #4464

kewp opened this issue Feb 25, 2020 · 9 comments
Labels
awaiting submitter needs a reproduction, or clarification stale-bot

Comments

@kewp
Copy link

kewp commented Feb 25, 2020

I have a variable I use to basically fade a component out, and then update, like this:

{#if myvar}
  <Component2 />
{:else}
  <Component2 />
{/if}

I don't know a better way to do this?

Anyway, for some reason at random times the old object stays behind. I'm just hoping someone might have an idea why this might happen? I don't understand how Svelte would implement the above code.

I created a REPL for this https://svelte.dev/repl/aa8de3c5614744838c7e0baeb83fd1c4?version=3.19.1 though I'm not seeing the same behaviour (which would mean you'd see two hello messages).

@MrSrsen
Copy link

MrSrsen commented Feb 26, 2020

There are some related issues and I too had this issue:

#3202
#3410

@kewp
Copy link
Author

kewp commented Feb 26, 2020

Thanks @MrSrsen that helps me a lot

@pushkine
Copy link
Contributor

pushkine commented Apr 5, 2020

this is a css issue
If you want two components to stack on each other you can use the outrostart event to switch their css position property
https://svelte.dev/repl/1cf9e9aae534491a9181dc49c4e520f4?version=3.20.1

@MrSrsen
Copy link

MrSrsen commented Apr 6, 2020

this is a css issue

No, issue is that destroy is not called on component (in some cases with animations) and it's causing glitches. It is not CSS issue.

@pushkine
Copy link
Contributor

pushkine commented Apr 6, 2020

No, issue is that destroy is not called on component (in some cases with animations) and it's causing glitches. It is not CSS issue.

Sorry I didn't re-read myself before posting
I made a PR regarding the bug you are referring to and wanted to say that the repl provided in this issue works as expected
I felt that there was a reasonable chance that someone could expect transitioning components to stack on each other in this situation so I provided a css solution to achieve that behavior
either way this can be closed

@Conduitry Conduitry added needs repro awaiting submitter needs a reproduction, or clarification labels Jun 10, 2020
@antony
Copy link
Member

antony commented Jun 11, 2020

@pushkine do you have a link to the PR?

@pushkine
Copy link
Contributor

@antony #4634

@stale
Copy link

stale bot commented Jun 27, 2021

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.

@stale stale bot added the stale-bot label Jun 27, 2021
@stale
Copy link

stale bot commented Jul 11, 2021

This issue has been closed as it was previously marked as stale and saw no subsequent activity.

@stale stale bot closed this as completed Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter needs a reproduction, or clarification stale-bot
Projects
None yet
Development

No branches or pull requests

5 participants