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

RESOLVED FIXED in Firefox 63



7 months ago
a month ago


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



64 Branch

Firefox Tracking Flags

(firefox63 fixed, firefox64 fixed)



(2 attachments)



7 months ago
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.


7 months ago
Component: Untriaged → DOM
Product: Firefox → Core
Priority: -- → P2

Comment 1

7 months ago
Posted file testcase


7 months ago
Assignee: nobody → bugs

Comment 2

7 months ago
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 3

7 months ago
Comment on attachment 9010674 [details] [diff] [review]

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

Makes sense.
Attachment #9010674 - Flags: review?(ehsan) → review+

Comment 4

7 months ago
Pushed by
radio groups should work in shadow DOM, r=ehsan

Comment 5

7 months ago
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?

Comment 6

7 months ago
Last Resolved: 7 months 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+
Can't merge web-platform-tests PR due to failing upstream checks:
Github PR
* Taskcluster (pull_request) (
Upstream PR merged
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.