Re: [editing-explainer] How does cE=typing work with overtype (insert key is on) (#28)

> It would be extremely confusing for developers if only some deletions result in DOM modifications.

I agree.

> we should try to make it so that autocorrect, overwrite, IMEs and any other mode that may want to modify text nodes beyond simple insertion all work in similar ways.

I don't think that putting overwrite (OW) in the same basket as autocorrect (AC) and IME is right. While OW must work over complex DOM structures (e.g. `1|<b>23</b>`) AC and IME deal with "pure" text nodes. Their operations are much simpler. Therefore, maybe something like this makes more sense:

 * **OW**: fires a "typing" intent event with the additional "overwrite" flag you proposed. JS will handle the deletion and the positioning of the selection in the right place, just like a normal "typing" intent.

 * **AC, IME, Spell-Checker, etc**: fires a "replace" (or "rewrite") intent, with the range to be replaced and the text to be inserted. JS may change the range or change the text before the browser performs the action.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/28#issuecomment-67616873

Received on Friday, 19 December 2014 09:38:52 UTC