Table of contents
The DOM input event is fired synchronously when the value of an <input>
or <textarea>
element is changed. Additionally, it's also fired on contenteditable editors when its contents are changed. In this case, the event target is the editing host element. If there are two or more elements which have contenteditable as true, "editing host" is the nearest ancestor element whose parent isn't editable. Similarly, it's also fired on root element of designMode editors.
- Interface :
Event - Synchronicity :synchronous
- Bubbles : yes
- Target :
Element - Cancelable : no
- Default action : none
Specification
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | (Yes) | (Yes) | ? |
on contenteditable element | (Yes) | 14.0 (14) | (Yes) Event target is the innermost element at caret position. | -- | (Yes) |
when designMode is "on" | -- | 14.0 (14) | -- | -- | ? |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | (Yes) | ? | ? | ? |
on contenteditable element | ? | 14.0 (14) | ? | ? | ? |
when designMode is "on" | ? | 14.0 (14) | ? | ? | ? |
Gecko notes
Prior to Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0) , Gecko didn't fire input events while composition was ongoing using IMEs or when dead keys were used on the Mac.


Mozilla Developer Network