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

Lifecycle broken with nested keep-alive components #3882

Closed
sqal opened this issue Oct 9, 2016 · 1 comment
Closed

Lifecycle broken with nested keep-alive components #3882

sqal opened this issue Oct 9, 2016 · 1 comment
Labels

Comments

@sqal
Copy link
Contributor

sqal commented Oct 9, 2016

Vue.js version

2.0.1

Reproduction Link

https://jsfiddle.net/uyt4tzak/1/

Steps to reproduce

  1. Open reproduction link
  2. Go to /auth/register
  3. Play with step buttons, in console you'll see components are correctly activated/deactivated
  4. Click on the login button, you'll be redirected to home view (/) and in console you'll see that Auth/Login/Register components are properly destroyed, except components inside Register component. Their destroyed hook isn't called.

What is Expected?

Dynamic component inside nested <keep-alive> component should be always properly destroyed.

In my case, after redirecting from /auth/register to / you should see following logs in the console:

Auth component destroyed
Login component destroyed
Register component destroyed
destroyed step X

What is actually happening?

Destroyed hook in Step component is never called, which means that component itself is never destroyed.

@sqal
Copy link
Contributor Author

sqal commented Oct 12, 2016

Hey @yyx990803 Thanks for the fix, but looks like the issue still persist.

Updated jsfiddle: https://jsfiddle.net/uyt4tzak/2/

Steps to reproduce:

  1. Go to /auth/register
  2. Switch between steps
  3. Go back to /auth/login
  4. Now click on the login button

@yyx990803 yyx990803 reopened this Oct 12, 2016
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

2 participants