-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
v-model on custom component behaves differently in IE and Edge #4796
Comments
It's worth pointing out this worked fine in Vue <= 2.1.8 |
+1 |
Hey, sorry for the delay. Completely forgot about this. |
@posva Could you provide a bit more info on the "onChange fires before the computed setter in Edge". How is the computed setter fired? I'm trying to get enough info for an Edge bug report. |
@jdalton AFAIK, the problem is that when clicking on the checkbox, the order of the https://jsfiddle.net/rj3g9j0y/ Chrome/FF: click -> change I'm not sure if this behavior is specified anywhere in the spec though. |
Ah nice! Thanks for the simplified repro! |
@jdalton awesome! @yyx990803 BTW, should we close this since it's related to the browser firing in a different order? |
I've reported the issue internally. I'll ping back when I get more info. |
@jdalton update: it seems PhantomJS and Safari also fire The spec states that:
So technically, |
Oh ya, not arguing for the current behavior. I think Edge should align with Chrome/FF. |
Vue Version
2.1.10
Issue Description
Based on other examples I've seen, when embedding a checkbox in a custom component a 'proxy' value has to be used to emulate the native
v-model
behaviour for a checkbox or radio input.This is particularly important when binding
v-model
on the custom component to an array as opposed to a boolean.This technique works fine in Firefox and Webkit-based browsers but fails in IE and Edge.
Demonstration of Issue
http://jsfiddle.net/andrewcourtice/jgxzbbvv/
Steps to Reproduce
Expected Outcome
The array of selected items (and the raw output) should be updated as each item is checked.
Actual Outcome
In IE and Edge the raw output is displaying a boolean value and the checked state of the checkboxes is inconsistent.
Thanks!
The text was updated successfully, but these errors were encountered: