Implement Selection.getComposedRange() and Selection.direction
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
People
(Reporter: smaug, Assigned: sefeng211)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed, parity-safari)
Comment 1•8 years ago
|
||
Updated•8 years ago
|
| Reporter | ||
Updated•8 years ago
|
| Reporter | ||
Updated•8 years ago
|
Comment 2•7 years ago
|
||
Here's WebKit's bug: https://bugs.webkit.org/show_bug.cgi?id=163921
The current consensus is to add getComposedRange on Selection interface:
https://github.com/w3c/webcomponents/issues/79
Comment 3•5 years ago
|
||
Updating title as such.
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 4•3 years ago
•
|
||
The Safari 17 beta now has this, as implemented in https://bugs.webkit.org/show_bug.cgi?id=163921
Updated•3 years ago
|
| Reporter | ||
Comment 5•3 years ago
•
|
||
The specification isn't quite ready yet, so I don't know what they have shipped in their beta. The specification was discussed during the web components f2f, see for example https://github.com/w3c/selection-api/issues/161#issuecomment-1517552762
Comment 6•2 years ago
|
||
Hi! One of the authors of CKEditor here.
To be completely honest – whatever is shipped, even if it's not fully compatible with the non-existent standard, is better than the current state. And Firefox is the last browser that still hasn't shipped something.
Without that, we cannot implement shadow DOM support in CKEditor 5. And this issue is regularly brought up by our community: https://github.com/ckeditor/ckeditor5/issues/3891
Comment 7•2 years ago
|
||
It looks that one of the patches in bug 1867058 already implements this new API. Should we close this as duplicate?
| Assignee | ||
Comment 8•2 years ago
|
||
I may be able to land the patches for this first, without other shadow dom selection stuff. Let me try that
| Assignee | ||
Updated•2 years ago
|
| Reporter | ||
Comment 9•2 years ago
•
|
||
But we couldn't enable this before actual selection handling and copy-paste and stuff works with shadow DOM.
| Assignee | ||
Comment 10•2 years ago
|
||
Yeah, probably not useful at all for landing getComposedRange() by itself...because without bug 1867058, one can't use setBaseAndExtent to set cross boundary selections. So the value of what getComposedRange provides on its own is questionable.
bug 1867058 is not that far from landing. I'll work towards landing that instead of landing getComposedRange() on its own.
I am going to take Hsinyi's suggestion as making this a duplicate
Description
•