-
Notifications
You must be signed in to change notification settings - Fork 27.4k
model isnt't updated upon ESC in IE #7297
Comments
reset input on escape is an IE specific behavior. Neither FF29 nor Chrome 34 do this. I don't think angular should handle this in core. Fits best into a module hint hint |
Well it breaks the expected behaviour. User clicks in the input, hits ESC because for some reason he is used to do it to clear inputs in his browser, then hits the save button and saves to DB not what he expects. It was the reason of a pretty serious bug report in my application and was hard to track down. I would appreciate to see it fixed (or at least welcome for a PR). |
to be honest, the correct place to file a bug report for this one would be to microsoft. This would be way too easy to break other things if merged into angular, in my opinion. If MS wants to behave that way, then they need to emit an input or change event when they do it. And given that they happily emit input events at completely ridiculous times, such as when a control with a placeholder is clicked, then they should be perfectly happy to do it then too. |
I have submitted a bug for this with Microsoft: https://connect.microsoft.com/IE/feedback/details/881670/ie11-esc-key-changes-value-of-input-type-text-but-does-not-fire-input-event |
I'm not sure if this was fixed by Microsoft as they are no longer updating IE11. They also shut down Microsoft Connect, so the bug link above no longer works. It also looks like JSFiddle no longer supports IE11 (it's just a bouncing cloud forever). But I created a CodePen for this and testing in IE11 seems to demonstrate that the model is now updated when the CC @gkalpak |
Confirmed that this works in AngularJS 1.7.2. Thanks @Splaktar ! |
This happens in Internet Explorer 11. Hitting ESC in an
input
element clears it but the model isn't updated.Fiddle: http://jsfiddle.net/e8TDg/
type something in the
input
and then hit ESC button on keyboard. Theinput
clears, but the model value remains.The text was updated successfully, but these errors were encountered: