Re: [w3c/uievents] Event order between "compositionend" and "input" (#202)

> Some web apps want to be able to ignore the intermediate input events generated during composition, but they want the final input event (effectively, they want to consider the composition as a single input action).

I believe when we originally wrote the level 2 input events spec, our information was that the last input event may not give us information about the contents and placement of the entire composition string. And also at that start, when a composition is initiated on a pre-existing string, we would not know where that string is. This is why we added the cancelable `beforeinput` events with inputtypes `deleteByComposition` (before composition) and `insertFromComposition` (after composition). 

Without those events, as in level 1, the only important piece of information we can listen for is when the composition has finished. Once that has happened, we diff the DOM and find out what has changed, based on that make a guess on what the user wanted to enter/delete, and then act upon that.

So unless something has changed so that one can always know where the entire string was placed based on the information of the last input event during composition and what has changed, I don't know if this is of much help to webapps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/202#issuecomment-437678692

Received on Sunday, 11 November 2018 15:15:57 UTC