Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhantomJS 2.1.1 v-model unexpected behavior #4896

Closed
matt-oconnell opened this issue Feb 9, 2017 · 2 comments
Closed

PhantomJS 2.1.1 v-model unexpected behavior #4896

matt-oconnell opened this issue Feb 9, 2017 · 2 comments

Comments

@matt-oconnell
Copy link

matt-oconnell commented Feb 9, 2017

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.

@matt-oconnell matt-oconnell changed the title PhantomJS 2.1.1 v-model unexpected behavior PhantomJS 2.1.1 v-model unexpected behavior Feb 9, 2017
@yyx990803
Copy link
Member

This is actually duplicate of #4796 - similar to IE, PhantomJS also seems to trigger change event before click.

@jdalton
Copy link

jdalton commented Feb 21, 2017

It's not just PhantomJS, it's also Safari 10.0.3 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants