Skip to content

Using v-show and :style="display: 'block'" simultaneously does not yield the expected results in version 2.7.16. #13140

Open
@senwong

Description

@senwong

Version

2.7.16

Reproduction link

codesandbox.io

Steps to reproduce

2.7.16 Demo

when the button is clicked, it initiates a component update. Subsequently, the content div is meant to be hidden. Nevertheless, the current behavior deviates, as the content div is displayed rather than being hidden.

2.7.15 Demo
In version 2.7.15, clicking the button triggers a component update, and as a result, the content div consistently remains hidden.

The version 2.7.16 should not introduce this breaking change.

What is expected?

v-show should have a higher priority than :style.

What is actually happening?

The style is being updated incorrectly.

Activity

dkdk135

dkdk135 commented on Jan 4, 2024

@dkdk135

amazing

carakas

carakas commented on Jan 8, 2024

@carakas

Ran into this as well, had to revert to v2.7.15 after receiving a complaint

ZAID-BAARAB

ZAID-BAARAB commented on Jan 20, 2024

@ZAID-BAARAB

i never noticed that !

zhongzi-rail0039

zhongzi-rail0039 commented on Feb 22, 2024

@zhongzi-rail0039

i never noticed that !

jackiotyu

jackiotyu commented on Feb 28, 2024

@jackiotyu

The error comes from: f5ef882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @carakas@dkdk135@zhongzi-rail0039@senwong@jackiotyu

      Issue actions

        Using v-show and :style="display: 'block'" simultaneously does not yield the expected results in version 2.7.16. · Issue #13140 · vuejs/vue