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

Component disappears on first re-render #6372

Closed
privatenumber opened this issue Aug 15, 2017 · 5 comments
Closed

Component disappears on first re-render #6372

privatenumber opened this issue Aug 15, 2017 · 5 comments
Labels

Comments

@privatenumber
Copy link
Contributor

@privatenumber privatenumber commented Aug 15, 2017

Version

2.4.2

Reproduction link

http://jsfiddle.net/yMv7y/3265/

Steps to reproduce

On the JSFiddle, wait for the setTimeout on L15 to complete after two seconds.

What is expected?

For CustomElA to still be in the DOM.

What is actually happening?

CustomElA is removed from the DOM on re-render. However, it comes back on the third re-render (tested using setInterval instead of setTimeout on JSFiddle on L16).


The JSfiddle is using Vue v2.4.0 but I have verified the bug on v2.4.2 locally.

@posva posva added the bug label Aug 15, 2017
@posva
Copy link
Member

@posva posva commented Aug 15, 2017

Looks like a bug, thanks for reporting it. Looks like it was introduced in 2.1.4. It looks like the problem happens during the patch of vnodes though.

edit: looks like _isDestroyed is false at init during vnode patch, making it not to call mount and disappearing from the node tree

@yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Aug 29, 2017

This is fixed, but do note that because you are changing the element wrapping the slots, the element is considered "replaced" and thus all slot content, including the components in it, will be destroyed and then re-created. This is unfortunately how the vdom patching works and unlikely to change.

@privatenumber
Copy link
Contributor Author

@privatenumber privatenumber commented Aug 30, 2017

@yyx990803
Sounds good, thanks. Do you have a ballpark date for the next release?

FranklinTesla added a commit to FranklinTesla/vue that referenced this issue Sep 5, 2017
@Tolmark12
Copy link

@Tolmark12 Tolmark12 commented Sep 8, 2017

Also wondering about when the next release will occur, or, in the mean-time, is there a way to install this version? Thanks.

@posva
Copy link
Member

@posva posva commented Sep 8, 2017

@Tolmark12 clone the repo, build the files and run npm link to use the local version of vue 😉 (those are very rough instructions)

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

Successfully merging a pull request may close this issue.

4 participants