Subscribe on changes!

v-show conflicts with string-based style binding

avatar
Nov 11th 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.