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

v-show conflicts with string-based style binding #2583

Closed
zlu883 opened this issue Nov 11, 2020 · 0 comments · Fixed by #3230
Closed

v-show conflicts with string-based style binding #2583

zlu883 opened this issue Nov 11, 2020 · 0 comments · Fixed by #3230
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working

Comments

@zlu883
Copy link

zlu883 commented Nov 11, 2020

Version

3.0.2

Reproduction link

https://codepen.io/zlu883/pen/QWEJOMd

Steps to reproduce

Click "change style string" button in the pen

What is expected?

The red div is not expected to show under any circumstances since it's v-show is set to false.

What is actually happening?

Updating the reactive style string overrides the 'display: none' generated by v-show, causing the div to appear


This behavior only happens if the style binding is a string. v-show works as expected if style binding is an object. One would expect the behavior to be consistent regardless the type of the style binding.

@posva posva added 🐞 bug Something isn't working has PR A pull request has already been submitted to solve the issue labels Nov 12, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working
Projects
None yet
2 participants