Closed Bug 1490406 Opened 3 years ago Closed 3 years ago

Nightly: Firefox doesn't respect radio groups in shadow DOM


(Core :: DOM: Core & HTML, defect, P2)

64 Branch



Tracking Status
firefox63 --- fixed
firefox64 --- fixed


(Reporter: caleb.d.williams, Assigned: smaug)



(Keywords: nightly-community)


(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36

Steps to reproduce:

Testing a component that includes generated radio buttons inside a shadow root. Buttons with the same name are not counted as part of the same group and will allow you to select multiple options.

There is a reproduction at

Actual results:

Multiple radio buttons can be selected.

Expected results:

A single radio button should be selected similar to the light DOM.
Component: Untriaged → DOM
Product: Firefox → Core
Priority: -- → P2
Attached file testcase
Assignee: nobody → bugs
remote: adding changesets                                                                                                                                                                     
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 9 changes to 9 files (+1 heads)
remote: recorded push in pushlog
remote: View your change here:
remote: Follow the progress of your build on Treeherder:
remote: recorded changegroup in replication log in 0.018s

Not quite sure who should review this.

The patch is basically just moving implementation of radio group handling from nsDocument to DocumentOrShadowRoot. nsDocument and ShadowRoot themselves still need to inherit the actual interface, since we have tons of code expecting that nsIDocument doesn't multiple inherit nsISupports.

Code moves are annoying to review.

Note, I'm not trying to make us to follow the spec in disconnected trees. That would be a different bug, but way too risky change for beta (I'd prefer to get this to beta). And that has nothing to do with shadow DOM.
Attachment #9010674 - Flags: review?(ehsan)
Comment on attachment 9010674 [details] [diff] [review]

Review of attachment 9010674 [details] [diff] [review]:

Makes sense.
Attachment #9010674 - Flags: review?(ehsan) → review+
Pushed by
radio groups should work in shadow DOM, r=ehsan
Comment on attachment 9010674 [details] [diff] [review]

Approval Request Comment
[Feature/Bug causing the regression]: Not a regression, but new feature, bug 1205323
[User impact if declined]: possibly broken behavior
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: just landed to m-i
[Needs manual test from QE? If yes, steps to reproduce]:  I don't think so
[List of other uplifts needed for the feature/fix]: NA
[Is the change risky?]: not too
[Why is the change risky/not risky?]: Mostly just moving code upper in the class hierarchy so that it can be used also by ShadowRoot
[String changes made/needed]: NA
Attachment #9010674 - Flags: approval-mozilla-beta?
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Created web-platform-tests PR for changes under testing/web-platform/tests
Comment on attachment 9010674 [details] [diff] [review]

Fix with tests for a 63 feature, uplift approved for 63 beta 9, thanks.
Attachment #9010674 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.