Re: [uievents] specify how compositionend works if the caret has been moved to a different element (#5)

OK, once I find a computer, I will try to sketch it. Basically, content editable editors have gone through several generations, and it seems like the paradigm for the upcoming generation is to have three layers of the document:
1. What can be seen in the browser.
2. What is in the DOM.
3. The document represented in a JavaScript object that can be handed around as Json.

One layer of the JS code keeps 2 and 3 in sync. To do this job as easy as possible, it is important that any change to either one can be represented as an atomic commit that can be translated between 2 and 3 without ambiguity. The list of these commits can be stored to replay the document history, or by exchanged and run through an Operational Transformations (OT) handling mechanism for collaborative editing. 3 can be stored at any time, also during a composition, so that this stored version later can be recreated as 2 in a meaningful way (not with half a composition done or alike).
IME input does not easily fit into this model, because the commits are not atomic and the difference between normal input mode and composition input is created. That's why it would be an advantage to be able to keep IME input handling at level 1 and only make the constructed characters hit level 2 and 3 once this can be done in forms of an atomic commit (ie when composition is done). To do this in a way that is transparent to the user, usage of the Shadow DOM as shown in my example would be helpful.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/5#issuecomment-137460206

Received on Thursday, 3 September 2015 14:05:14 UTC