w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 51 forks source link

Drop "Sent only if the DOM was updated." from 5.7.6. Input Events During Composition #269

Open masayuki-nakano opened 4 years ago

masayuki-nakano commented 4 years ago

5.7.6. Input Events During Composition says

The beforeinput and input events are sent along with the compositionupdate event whenever the DOM is updated as part of the composition. Since there are no DOM updates associated with the compositionend event, beforeinput and input events should not be sent at that time.

and

Sent only if the DOM was updated.

However, input event should be fired for notifying ending composition because if browsers do so, web apps don't need to manage composing state with compositionstart and compositionend. (See also #220) And Input Events Level 2 is designed for that with new inputType value, "insertFromComposition". So, I think that the first quotation can be dropped. And the latter can be written with "Sent only if the beforeinput is not canceled`.

Note that browsers currently send input events at committing composition with same string.