Hi,

This is a feedback from multiple browser vendors (Apple, Google, Microsoft) 
that got together in Redmond last Thursday to discuss editing API and related 
events.

First off, we found out that there are behavior inconsistencies between 
browsers with respect to composition events.

WebKit, Blink, and Gecko all fire `compositionupdate` events before mutating 
DOM whereas Edge and Trident both requires the event after mutating DOM.  We 
think UIEvent spec should be updated to explicitly make the majority behavior 
(firing the event before mutation DOM) standard.

Since this is a ricky behavioral change for Edge/Trident, we think it's better 
to fire `before input` event prior to firing `compositionupdate` instead of the 
other way around was defined in:
http://w3c.github.io/editing/input-events.html#events-inputevent-event-order

We also found that WebKit and Blink both mutate DOM without firing 
`compositionupdate` at the end of composition on Mac.  Only `compositionend` is 
fired.  We think this is a bug in WebKit/Blink especially since Blink fires 
`compositionupdate` before `compositionend` on Windows.  Therefore, we suggest 
that WebKit/Blink fix this bug, and standardize the behavior whereby which 
`compositionupdate` is fired before mutating DOM prior to firing 
`compositionend`.

Furthermore, the above change to always fire `compositionupdate` eliminates the 
necessity for firing `beforeinput` event prior to firing `compositionend` so we 
suggest we remove this from the input event spec:
http://w3c.github.io/editing/input-events.html#events-inputevent-event-order

That is, we only fire `beforeinput` event before and only before firing 
`compositionupdate`, which shall be fired before every DOM mutation initialized 
by input methods.

- R. Niwa


Reply via email to