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

> 
> 
> > I think that Firefox's behavior is better than Chrome for defining as standards and simpler.
> 
> How about this situation:
> 
> A. `<div contenteditable><p>ab[c<span contenteditable="false">non-editable]</span>def</p></div>`
> 
> vs.
> 
> B. `<div contenteditable><p>ab[c<span contenteditable="false">non-editable</span>]def</p></div>`
> 
> ?
> 
> If I understood you correctly, in situation A, nothing should be deleted, whereas in situation B, the entire selection should be deleted, correct?

Correct. But I'm open to check whether the point is next to editable point.

> I don't have a strong opinion, but I think one disadvantage of doing it the way Firefox does it is that a very small difference in the selection leads to a big difference in browser behavior. The difference in selection could be so small that the user doesn't even notice and therefore gets confused about why the selected content is not deleting.

This shouldn't occur in these days since as you know, `contenteditable="false"` handling of browsers is different. And the cost to check whether the start and end of the range is next to editable content in same editing host can be ignored since it shouldn't be a hot path in real use cases. So, I'm wondering that this can be standardized.

-- 
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#issuecomment-789441944

Received on Wednesday, 3 March 2021 05:26:00 UTC