Open Bug 472980 Opened 11 years ago Updated 1 year ago

document whose root element is display:none can't take focus

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set

Tracking

()

People

(Reporter: dbaron, Unassigned)

References

Details

This is split off from bug 283686.

A document whose root element is display:none can't take focus, and seems to break focus/tabbing stuff.

Steps to reproduce:
 1. load attachment 175578 [details]
 2. click in the location bar
 3. hit tab twice (or three times if you have tabs in the browser)
 4. hit Shift-tab twice (or three times) to reverse

Expected results:
 3. document has focus outline
 4. focus is back in location bar

Actual results:
 3. no focus outline
 4. no focus outline
On my Mac (10.5.6), with that testcase most keyboard shortcuts fail - the only one that works is Cmd+H (hide the app).
ccing mats, and especially enn (since he's rewriting focus anyway).
Do we want to make the document focusable, or make the document non-focusable, and remove it from the tab order? There's no frame to draw the focus ring (I assume) nor one to fire key events at, so I assume the latter.

What should happen when clicking the empty document area?
Ideally I think the document should be focusable, but I don't think it matters a huge amount.  There's still a viewport frame and canvas frame, I'd think, although one or both might have null mContent...
Duplicate of this bug: 602213
The focus outline still appears not to be drawn, although keyboard shortcuts now appear to work again.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.