Skip to content

v-if rerender input bug in production, works fine in dev #6452

Discussion options

You must be logged in to vote

Because of these code

if (
!__DEV__ &&
vnode.el &&
hostCloneNode !== undefined &&
patchFlag === PatchFlags.HOISTED
) {
// If a vnode has non-null el, it means it's being reused.
// Only static vnodes can be reused, so its mounted DOM nodes should be
// exactly the same, and we can simply do a clone here.
// only do this in production since cloned trees cannot be HMR updated.
el = vnode.el = hostCloneNode(vnode.el)
} else {

If you want't reused, you can use like this: Playground .
Hope this can help you.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PYPARA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants