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

out-in transition issue with async components #5760

Closed
FranckFreiburger opened this issue May 26, 2017 · 17 comments
Closed

out-in transition issue with async components #5760

FranckFreiburger opened this issue May 26, 2017 · 17 comments
Labels

Comments

@FranckFreiburger
Copy link

Version

2.3.0

Reproduction link

https://jsfiddle.net/z11fe07p/1959/

Steps to reproduce

What is expected?

The previous component (A) should disappear before component B appears

What is actually happening?

Components A and B are visible simultaneously


This behavior is happens only when component B is not already loaded. Next time you switch from A to B, everything is fine.

@posva posva added the bug label May 26, 2017
@posva
Copy link
Member

posva commented May 26, 2017

Thanks, looks like a bug. Thanks for the concise and clear repro 🙂

@gebilaoxiong
Copy link
Member

gebilaoxiong commented May 26, 2017

It seems the async component is rendered too early

@gebilaoxiong
Copy link
Member

gebilaoxiong commented May 31, 2017

I have solved, wait a minute ...

When rendering async components, we need to use a hidden element placeholder

@clingor
Copy link

clingor commented Jun 12, 2017

Are you sure this solves the async component transitions? I'm new to Vue so it's likely a bug in my code, but my repo below still exhibits the transition out-in bug where the incoming component doesn't wait for the out fade to complete. Note I'm using the http-vue-loader named above.

Async Component Transition Bug Demo

@posva posva reopened this Jun 12, 2017
@posva
Copy link
Member

posva commented Jun 12, 2017

This is indeed still failing with the same repro. The transition starts right away as @clingor said

@gebilaoxiong
Copy link
Member

@posva

https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.js

Looks like this version does not contain the fix code

@yyx990803
Copy link
Member

yyx990803 commented Jun 13, 2017

The fix has not been released yet. We closed issues when the patch lands in the dev branch, but it might not be in a public release yet.

2.3.4 only contains a single fix for a memory leak (which has higher priority)

@posva
Copy link
Member

posva commented Jun 13, 2017

My bad, I just saw the commit was before the release and thought it was strange. It would have been in the release notes anyway

@clingor
Copy link

clingor commented Jun 13, 2017

Sorry for the misunderstanding, and thank you for confirming the issue!

@clingor
Copy link

clingor commented Jul 21, 2017

This doesn't appear to be fixed yet in 2.4.2. Is this still pending release?

Async Component Transition Bug Demo

@posva
Copy link
Member

posva commented Jul 21, 2017

@clingor Are you sure? The jsfiddle works nicely

@clingor
Copy link

clingor commented Jul 21, 2017

The fiddle does work correctly, but the code in my example GitHub repo still exhibits the same behavior. It could be the http-vue-loader helper library, or maybe something in my code. This example is simple and was created to demonstrate the issue.

@FranckFreiburger would any of these VueJS changes require an update to http-vue-loader?

@posva
Copy link
Member

posva commented Jul 21, 2017

if you put the issue on a jsfiddle without the loader I can take a look

@SubheKhalaf
Copy link

SubheKhalaf commented Jul 22, 2017 via email

@FranckFreiburger
Copy link
Author

The culprit is <keep-alive> !

Steps to reproduce

  1. see https://jsfiddle.net/z11fe07p/2382/
  2. click the "B" button

@FranckFreiburger
Copy link
Author

@posva, are you able to reproduce ?

@posva
Copy link
Member

posva commented Jul 27, 2017

@FranckFreiburger You should open a new issue for that. Thanks BTW 😉

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

No branches or pull requests

6 participants