Skip to content

PhantomJS 2.1.1 v-model unexpected behavior #4896

@matt-oconnell

Description

@matt-oconnell

Vue.js version

2.1.10

Reproduction Link

http://jsfiddle.net/mattoconnell408/df4Lnuw6/137/

Steps to reproduce

Use PhantomJS 2.1.1
Set up a checkbox within a component.
Bind a handler function to the change event on the checkbox
Bind a data value to the v-model attribute

What is Expected?

The expected behavior is shown in the fiddle.
The value bound to v-model should change to true when the checkbox is clicked. The handler method should emit the new v-model value.

What is actually happening?

Possible incompatibility issue with Phantom. An initial click on the checkbox should change the value bound in the v-model to true. Instead, it reports false. The v-model value is changing with each click. It appears the handler bound to the @change event is being called before the v-model value is being updated. This is only happening with Phantom, but works as expected everywhere else.

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