Works in Firefox and Safari. I'll give it some thought and see if I can come up with a solution. // detect autofills in Chrome and Safari by: // - assigning animations to :-webkit-autofill, only available in Chrome and Safari, // - listening to animationstart for those specific animations, // during autofill, the animation name is onautofillstart, // during autofill cancel, the animation name is onautofillcancel, // input events with data may cancel autofills, // input events without data are autofills, // - listening to transitionstart, only available in Edge, Firefox, and Internet Explorer, // - checking filter style, which is only changed in Firefox, // during autofill cancel, brightness is not 1.

The other difference is that onchange attribute also works with . works with type="number" spinner control too (which onkeypress doesn't work with). Here is well demonstrated the different between the two: https://javascript.info/events-change-input, The two events signal two different user gestures/moments ("input" event means user is writing or navigating a select list options, but still didn't confirm the change. I'll be damned: on iOS safari two extra conditions are necessary compared to other browsers: 1) The input must be actually appended to the DOM. Why is changing the size of the Supreme Court considered dangerous today, when it has been done in the past? scope. If you right-click into a text field you'll have cut and paste options that you can use to change the value without making a keystroke. Is every finite group the outer automorphism group of a finite group? What is this IC Chip on this circuit board? Be aware that your code or even the browser might provide an initial value for the input field so you might be notified of a "change" before the user does anything; adjust your code as necessary. Making statements based on opinion; back them up with references or personal experience.

See my answer if you're using jQuery, it's incredibly easy now. Another similar event is the cross-browser onchange event, but it occurs after the element loses the …

How do I get the value of text input field using JavaScript? onchange is only triggered when the control is blurred. html onchange event not working, http://www.zurb.com/playground/jquery-text-change-custom-event, https://javascript.info/events-change-input, Nvidia has acquired Arm.

How does the highlight.js change affect Stack Overflow specifically?