You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In updated hook, vnode inside slots children (this.$slots.default) should have a reference to its DOM element on property vnode.elm
What is actually happening?
vnode.elm is undefined
Did some investigation on it.
It just happened on nested component, (<slot> as children for another component). And it only happened after patching, it means in the initial stage (mounted hook), the vnode has correct reference to its DOM node, but after update (updated hook), the elm reference is missing.
The text was updated successfully, but these errors were encountered:
jkzing
changed the title
VNode.elm missing in nested slots
VNode.elm missing for nested slots after component update
Apr 13, 2017
This is somewhat expected behavior because slot nodes are shallow-cloned during render, so when nested passes the slot nodes down to block, block clones the slot nodes and then patches them (adding .elm in the process), however, the slot nodes in nested remain non-patched.
This is a wontfix because you should not be relying on vnode.elm in your render functions. This is not part of intended usage for vnodes.
Version
2.2.6
Reproduction link
https://jsfiddle.net/jingkaizhao/f11tpysz/5/
Steps to reproduce
What is expected?
In updated hook, vnode inside slots children (this.$slots.default) should have a reference to its DOM element on property vnode.elm
What is actually happening?
vnode.elm is undefined
Did some investigation on it.
It just happened on nested component, (<slot> as children for another component). And it only happened after patching, it means in the initial stage (mounted hook), the vnode has correct reference to its DOM node, but after update (updated hook), the elm reference is missing.
The text was updated successfully, but these errors were encountered: