Cannot select elements across shadow boundaries.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: emilio, Assigned: sefeng)
References
(Depends on 2 open bugs, Blocks 3 open bugs)
Details
Attachments
(2 files)
Reporter | ||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
I am going to spend some time in the shadow dom cross boundary selecton proposal and see what we can do.
Assignee | ||
Comment 3•3 years ago
|
||
Looks like STR is outdated, so I attached a new testcase.
Updated•2 years ago
|
Comment 5•1 year ago
|
||
Is this still being worked on? Otherwise consider unassigning it.
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Any gut feeling yet how complex fixing this is? Any context here is appreciated.
Assignee | ||
Comment 8•1 year ago
|
||
Implementing the spec to return the ranges that have the correct start and end nodes is easy, though making the actual selection work (ie. the blue selection background) is hard.
Mostly due the selection code has the assumption that no shadow DOM is involved. For example ContentIterator doesn't iterate elements in shadow DOM, range gets confused for its common ancestor. Lots of assertions had the same assumption so it's hard to fix them. Slotted contents makes the entire thing more complicated.
Plus the same code has been used not only by selection but also editor stuff, which adds another level of complexity.
So far I've implemented the spec and made the visual selection works for some fairly complex shadow trees. I am fixing test failures related to editor and slotted contents. Fixed lots of them already, but still have a decent number of failures to go.
Hope this provides some context :)
Comment 9•1 year ago
|
||
Hope this provides some context :)
It did, thanks.
Btw., be aware that the clipboard-code might need refinement too.
Assignee | ||
Comment 10•6 months ago
|
||
Updated•6 months ago
|
Comment 11•6 months ago
|
||
Comment 12•6 months ago
|
||
bugherder |
Description
•