Closed
Bug 1145910
Opened 10 years ago
Closed 10 years ago
Shadow DOM prevents :active pseudo class from matching on the shadow host
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: mikehenrty, Assigned: wchen, NeedInfo)
References
Details
Attachments
(2 files, 1 obsolete file)
866 bytes,
text/plain
|
Details | |
5.14 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Attached test case. In the test case there is a blue box, which is the shadow host, that turns red on :active state. Inside that box is a shadow DOM box with a black border. Then inside that is a non-shadow span with the text "Text" inside of it.
Clicking on the blue box, or word "Text" triggers the :active pseudo selector. However, clicking withing the black border (ie. the shadow DOM box) and not on the "Text" will not trigger the :active class, and the host box stays blue. The shadow DOM must be preventing the :active state from propagating to normal web content.
Reporter | ||
Comment 1•10 years ago
|
||
William, any idea what's going on here?
User Story: (updated)
Flags: needinfo?(wchen)
Assignee | ||
Comment 3•10 years ago
|
||
The code to update the event state of content in the shadow DOM currently doesn't use the flattened tree when traversing ancestors so it stops at the shadow root.
Flags: needinfo?(wchen)
Assignee | ||
Comment 4•10 years ago
|
||
Now with test.
Here is the relevant text in the selector spec:
http://dev.w3.org/csswg/selectors-4/#active-pseudo
Seems to be missing from the HTML spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-active
Attachment #8581017 -
Attachment is obsolete: true
Attachment #8582028 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8582028 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Assignee: nobody → wchen
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86 → All
Comment 6•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Reporter | ||
Comment 7•10 years ago
|
||
Thanks William! Any chance we could request uplift to 37? This will help us improve the web components we are using for the lightsaber project, and I believe we want that working with b2g 2.2.
Flags: needinfo?(wchen)
Reporter | ||
Comment 8•10 years ago
|
||
Nevermind, I just checked and we don't care about having lightsaber work on 2.2.
Flags: needinfo?(wchen)
![]() |
||
Comment 9•10 years ago
|
||
Doesn't FindCommonAncestor need to be changed too? Otherwise the optimization story for moving the mouse into/out of a component will kinda suck in terms of updating the :hover state, I'd think.
Flags: needinfo?(wchen)
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•