Skip to content

DOM messed up after toggling v-if variable #3325

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

Closed
yappkahowe opened this issue Jul 26, 2016 · 0 comments
Closed

DOM messed up after toggling v-if variable #3325

yappkahowe opened this issue Jul 26, 2016 · 0 comments
Labels

Comments

@yappkahowe
Copy link

Please refer to this fiddle example.

Let's say I have 3 div elements, first and third div have a v-if directive to toggle their visibility based on the same boolean variable, e.g. "show" in the fiddle example, visible if true, invisible if false. It works correctly when I toggle the "show" to false, first and third divs become invisible. But then when I toggle the "show" to true again, the third div becomes visible, but the first div changed into a copy of the second div.

I have tested it with v2.0.0-beta.3 and v1.0.26. The bug only appears in v2.0.0-beta.3.

The bug appears only if 2 divs have v-if directive bound to the same variable, and there is one div between them which has no v-if directive bound to the same variable.

Sorry if my explanation is confusing. It is kind of difficult to explain this bug. That's why I created the fiddle example.

@yyx990803 yyx990803 changed the title [Bug][V2.0.0-beta.3] DOM messed up after toggling v-if variable DOM messed up after toggling v-if variable Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants