You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 thechange
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 causessubmit
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 ifelement.value
is set programatically before leaving the input field. For example, ifelement.value
is set during ainput
orkeyup
event, like might be done by input masking logic, thechange
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
orblur
) either in IE11 specifically or in general.Note: if we were to use the
input
event instead, it couldn't be used oncheckbox
orradio
type input elements since only Firefox supports theinput
event on them. We'd have to continue usingchange
.The text was updated successfully, but these errors were encountered: