Skip to content

v-model does not update value when external input/change event is fired on a checkbox #2804

@djam90

Description

@djam90

Problem

A checkbox input with v-model does not update the value when an "input" or "change" event was triggered externally, whereas this does work with a text input element.

Vue.js version

1.0.21

Reproduction Link

http://jsfiddle.net/7ud6jL42/3

Steps to reproduce

Click the button titled "Uncheck the checkbox" and the button titled "Fill text".

What is Expected?

The value of foo should change to false and the value of bar should change to "foobar".

What is actually happening?

The value of foo stays false whereas the value of bar changes to "foobar". It appears that the v-model does not pick up the fired "input" or "change" event on a checkbox input element but it does on a text input element.

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