Skip to content

defineModel doesn't run if the same value is selected #11541

@TheFlyer1983

Description

@TheFlyer1983

Vue version

3.4.36

Link to minimal reproduction

https://shorturl.at/I2MOA

Steps to reproduce

Select an option on the button to select, and then click the same option to deselect.

Expected:
The option should de-select.

Actual:
Nothing

What is expected?

When selecting the same option twice, it should select the option then deselect the option.

What is actually happening?

When selecting the same option twice, the original click selects the option but the second click doesn't do anything.

System Info

System: OS: macOS 14.5 CPU: (8) arm64 Apple M1 Pro Memory: 73.73 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm bun: 1.1.4 - /opt/homebrew/bin/bun Browsers: Brave Browser: 126.1.67.134 Chrome: 127.0.6533.99 Safari: 17.5

Any additional comments?

This worked previously on an older version of Vue: 3.4.16. Yesterday (6th August 2024) I ram npm install and it updated a patch version of Vue (3.4.36).

After that my button component stopped working correctly. I feel like this is a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions