compositionupdate event is fired when a character is added to a passage of text being composed (fires with special characters that require a sequence of keys and other inputs such as speech recognition or word suggestion on mobile).
|| ||Focused element processing the composition, null if not accessible.|
|| ||The type of event.|
|| ||Does the event normally bubble?|
|| ||Is it possible to cancel the event?|
||The original string being edited, otherwise the empty string. Read only.|
||The language code for the composition event, if available; otherwise, the empty string. Read only.|
|Feature||Chrome||Edge||Firefox (Gecko)||Internet Explorer||Opera||Safari|
|Basic support||(Yes)||(Yes)||9.0 (9.0)||(Yes)||No support||?|
|Feature||Android||Edge||Firefox Mobile (Gecko)||IE Mobile||Opera Mobile||Safari Mobile|
|Basic support||(Yes)||(Yes)||(Yes)||9.0 (9.0)||?||No support|
 Not dispatched immediately after
compositionupdate events are fired before editor contents are actually changed; that is, the value of an editable element has not yet been changed when
compositionupdate event handlers are called. Starting in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9),
input events are fired while editing is underway, after the contents of the element are changed. This lets you get the updated contents while editing is underway.
Gecko also doesn't support the
locale attribute for trusted events yet. However, web developers can set this value via
initCompositionEvent() when creating untrusted events.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.