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

Directive not updated if component changes its root element #6513

Closed
floorish opened this issue Sep 5, 2017 · 0 comments
Closed

Directive not updated if component changes its root element #6513

floorish opened this issue Sep 5, 2017 · 0 comments

Comments

@floorish
Copy link

floorish commented Sep 5, 2017

Version

2.4.2

Reproduction link

https://jsfiddle.net/floorish/25ukxqmu/

Steps to reproduce

  • add custom directive to some child component
  • child component changes its root element due to data change, i.e. <span v-if="val"></span><div v-else></div>

What is expected?

Directive is notified that the component is changed and the new <div> element is passed

What is actually happening?

Directive is not updated and still refers to the old <span> DOM node

ztlevi pushed a commit to ztlevi/vue that referenced this issue Feb 14, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant