[Webkit-unassigned] [Bug 224570] Selection ranges removed whenever focus changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 26 12:02:08 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=224570

--- Comment #7 from Ben Cronin <bcronin at quip.com> ---
I wanted to check back in on this in light of https://bugs.webkit.org/show_bug.cgi?id=224570#c6.

Again, WebKit seems to have unique behavior here that presents challenges to developers who want to achieve consistent behavior for contenteditable regions across browsers. The spec is fairly clear on what the behavior should be and I'm also not seeing how the WebKit behavior truly matches native MacOS behavior.

Furthermore, the suggestion that spec should be rewritten to match what WebKit does seems to run counter to the Priority of Constituencies principle: https://www.w3.org/TR/html-design-principles/#priority-of-constituencies. In particular: 
* Under the WebKit implementation, if authors want to maintain selection across focus changes (both for consistency with other platforms and for the convenience of users), they now face the burden of maintaining additional state to track the selection.
* Conversely, if the default user agent behavior were to maintain selection but an author (for some reason) wanted to have it cleared when focus changes, they could achieve that behavior with comparatively less overhead. 

Given that "costs or difficulties...to the author should be given more weight than costs to implementors," there seems to be a clear case for preserving the latter behavior, which is the current spec and the behavior implemented by other browsers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210426/b5be98f7/attachment.htm>


More information about the webkit-unassigned mailing list