iframe in shadow dom cannot be focused

RESOLVED DUPLICATE of bug 1430020

Status

()

P2
normal
RESOLVED DUPLICATE of bug 1430020
2 years ago
7 months ago

People

(Reporter: bdahl, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8764056 [details]
custom_element_focus.html

STR:
1) Enable webcomponents
2) Open attached test case
3) click within iframe
4) try to scroll with arrow keys

Expected:
The iframe is focused and the page scrolls

Actual:
The iframe doesn't scroll

Note: If I use a regular element instead an iframe it becomes correctly focused.
(Reporter)

Comment 1

2 years ago
Seems the following will fix it:

+++ b/dom/base/nsContentUtils.cpp
@@ -6148,7 +6148,7 @@ nsContentUtils::IsSubDocumentTabbable(nsIContent* aContent)
 {
   //XXXsmaug Shadow DOM spec issue!
   //         We may need to change this to GetComposedDoc().
-  nsIDocument* doc = aContent->GetUncomposedDoc();
+  nsIDocument* doc = aContent->GetComposedDoc();
   if (!doc) {
     return false;
   }
(I'm surprised anyone using the old v0 shadow DOM. But perhaps converting to the new slots based shadow DOM v1 won't be that hard when it becomes available. )
(Reporter)

Comment 3

2 years ago
FWIW, we're using it in positron.
I see. That patch btw makes totally sense :)
I don't recall if the spec has been fixed in this case though. So whoever reviews the patch needs to
review the spec too and if it is still buggy, file a spec bug.

I hope positron can later move to use the new syntax quite easily.
I'm interested in William's thoughts here.
Flags: needinfo?(wchen)
Whiteboard: btpp-followup-2016-07-05
Blocks: 1205323
Flags: needinfo?(william)
Priority: -- → P2
Whiteboard: btpp-followup-2016-07-05
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1430020
You need to log in before you can comment on or make changes to this bug.