The compositionend event is fired when the composition of a passage of text has been completed or cancelled (fires with special characters that require a sequence of keys and other inputs such as speech recognition or word suggestion on mobile).
| Bubbles | Yes | 
| Cancelable | Yes | 
| Target objects | Element | 
| Interface | TouchEvent | 
Properties
| Property | Type | Description | 
|---|---|---|
| targetRead only | EventTarget | Focused element processing the composition. | 
| typeRead only | DOMString | The type of event. | 
| bubblesRead only | boolean | Does the event normally bubble? | 
| cancelableRead only | boolean | Is it possible to cancel the event? | 
| viewRead only | WindowProxy | Document.defaultView(windowof the document) | 
| detailRead only | long(float) | 0. | 
| data Read only | DOMString(string) | The original string being edited, otherwise the empty string. Read only. | 
| locale | DOMString(string) | The language code for the composition event, if available; otherwise, the empty string. Read only. | 
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari | 
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | 9.0 (9.0)[1] | (Yes) | No support | ? | 
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | 
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | 9.0 (9.0)[1] | ? | ? | No support | 
[1] The event was fired in versions of Gecko before 9.0, but didn't have the DOM Level 3 attributes and methods. Gecko doesn't support the locale attribute for trusted events yet. However, this value can be set via initCompositionEvent() when creating untrusted events.
Related events
Document Tags and Contributors
    
    Tags: 
    
  
                    
                       Contributors to this page: 
        Liyunsheng, 
        ibmua, 
        erikadoyle, 
        fscholz, 
        Sebastianz, 
        teoli, 
        Sheppy, 
        ethertank, 
        louisremi
                    
                    
                       Last updated by:
                      Liyunsheng,