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.

@rniwa by DOM modifications do you mean Element node modifications or any node modification (including text nodes)?

Should we decide that cE=typing has a default action for backspace and delete then I believe this default behavior would only affect text nodes. The behavior would be to eliminate the character just before the caret (in the case of backspace), and if the character is at offset=0 of a text node, then it finds the previous text node and continues there. It would be up to the editor dev to clean up empty Element nodes as this happens, or relocate the caret as necessary before allowing the event to continue.

I think this would be reasonable.

> 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>)

@fredck agreed. Not only that, but more critically OW is a "combination intent": Delete + Insert in one default behavior. As we've seen a few months ago combo events are bad because the editor dev can't prevent one part but not the other.

> AC and IME deal with "pure" text nodes.

@fredck are we sure of this wrt to AC? 

Try putting `mi<b>r</b>iad` in Safari. If you right click on it, it will suggest 'myriad' (on my English-language Mac) and if you apply the correction it zaps the bold element.

On the one hand "real" text editors should be able to autocorrect partially-styled words. On the other, given we're trying to do something minimalist and workable with cE=typing maybe we could spec that autocorrect only operates on individual text nodes. We could tackle a full fledged AC API in V2.



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

Received on Friday, 19 December 2014 18:56:21 UTC