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
posva
changed the title
v-show directive should have unbind hook to reset element's display style value?
node with v-show inside v-if is reused in the adjacent v-else
Dec 15, 2016
Vue.js version
2.1.6
Reproduction Link
http://codepen.io/dolymood/pen/gLQmwy
Steps to reproduce
Code
bln=true
, thespan
element inel-if
is hiddenbln=false
, thespan
element inel-else
is hiddenWhat is Expected?
When
bln=false
, thespan
element should be visibleWhat is actually happening?
patchVnode
will check the nodes is same:Because the old vnode
vnode1.data
isand the new vnode
vnode2.data
isSo
sameVnode(span1, span2)
result istrue
, butupdateDirectives
will be callv-show
directive'sunbind
hook function.If the
span
elements have differentkey
attributes, the result will be correct. But i think it will be better if:The text was updated successfully, but these errors were encountered: