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

value bindings don't always update as expected on IE11 #369

Open
nlundquist opened this issue Nov 28, 2017 · 0 comments
Open

value bindings don't always update as expected on IE11 #369

nlundquist opened this issue Nov 28, 2017 · 0 comments

Comments

@nlundquist
Copy link
Contributor

Our value bindings attempt to update the view model when change events on the input element are fired. This works in most cases but is somewhat buggy on IE11 due to flaws in it's implementation of the change event.

For example, change is not fired when the enter key is pressed in an input field (https://connect.microsoft.com/IE/feedback/details/1552272/). This differs from other browsers. The enter key causes submit events that are bound to the containing form to run, but the view model won't have been updated with the value from the input.

Additionally, change isn't fired if element.value is set programatically before leaving the input field. For example, if element.value is set during a input or keyup event, like might be done by input masking logic, the change event won't be fired and the view model will be out of sync with the element in the view.

Cursory googling returns many other reports IE11 change events being missed.

Considering these issues, we may want to consider implementing other means of updating the view model when a value binding is used. The most obvious possibility is listening to a different event (likely input, keyup or blur) either in IE11 specifically or in general.

Note: if we were to use the input event instead, it couldn't be used on checkbox or radio type input elements since only Firefox supports the input event on them. We'd have to continue using change.

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

1 participant