Open
Bug 2016387
Opened 1 month ago
Updated 1 month ago
::selection is not inherited across trees
Categories
(Core :: Layout, defect, P3)
Tracking
()
NEW
People
(Reporter: keithamus, Unassigned)
Details
Attachments
(1 file)
|
222 bytes,
text/html
|
Details |
In a page with a global ::selection style, shadowroots will not inherit background/foreground colors of the selection.
This is inconsistent with other browsers such as Chrome.
STR:
- Open the attached test case.
- Press Ctrl+A or otherwise select all the text.
- Observe the selection colors
Expected:
- All selected text uses a hotpink backround with teal text.
Actual:
- The text in the "light DOM" uses hotpink/teal, but the shadowdom nodes are selected with the default selection colors.
Chrome is as expected, Firefox 147-nightly (likely earlier also) is not.
Comment 1•1 month ago
•
|
||
Both Chrome and Safari allow propagation of ::selection styles into the Shadow DOM. I think Firefox should allow it too because a selection is generally not considered to be a part of an element, but part of the browser's UI and therefor needs no encapsulation.
You need to log in
before you can comment on or make changes to this bug.
Description
•