[w3c/editing] Defind deleting command/operation what should do if selection range crosses editing host boundaries (#283)

I tested on Firefox and Chrome, Selection API add a range which crosses editing host boundaries in some cases. E.g.,
* `<div contenteditable><p>ab[c<span contenteditable="false">no]n-editable</span>def</p></div>`
* `<div contenteditable><p>a[bc<span contenteditable="false">non-editable<span contenteditable>de]f</span></span></p></div>`

If you `Backspace`, Firefox does nothing but fire `beforeinput` event, but Chrome deletes editable content **until** meeting first non-editable content.

I think that Firefox's behavior is better than Chrome for defining as standards and simpler. E.g., "If nearest inclusive ancestor editing host of start container and end container of a range is not same, nothing should be deleted, but dispatch `beforeinput` event whose target ranges is an empty array and whose input type is a value corresponding to the command (i.e., give the hints of delete amount and delete direction to web apps instead of using `deleteContent`).

I'll add tentative WPT about this issue, but it just checks whether the deleted range and target ranges are matched.

-- 
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/editing/issues/283

Received on Monday, 1 March 2021 07:59:33 UTC