Closed Bug 1022726 Opened 10 years ago Closed 9 years ago

Toolbox keyboard navigation is broken when switched from docked to detached.

Categories

(DevTools :: General, defect, P1)

41 Branch
defect

Tracking

(firefox40 fixed, firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox40 --- fixed
firefox41 --- fixed

People

(Reporter: canuckistani, Assigned: pbro)

References

(Blocks 1 open bug)

Details

(Whiteboard: [polish-backlog][difficulty=hard])

Attachments

(3 files, 1 obsolete file)

Seen on latest nightly and current Aurora

STR:

1. open toolbox in any docking mode (  bottom, side, detached )
2. click to select the inspector, then click to select any node in the current page to ensure keyboard focus is on the toolbox ( check by using the keyboard to navigate to the console and back again )
3. move the toolbox to a different docking mode
4. try to use the keyboard to navigate to a different tool pane

Expected: 

 - should be able to switch immediately

Actual

 - no keybindings seem to work at all

Workaround

 - clicking the mouse on anything in the toolbox restores keyboard focus.
Just tested Aurora and Stable, they suffer the same issue. Chrome works fine.
Bumped into this on Bug 1119133 as well
Whiteboard: [devedition-40][difficulty=easy]
I've always thought this was pretty bad, P1.
Priority: -- → P1
doing 'this.doc.defaultView.focus();' in Toolbox.prototype.switchHost, after the new host got created works, sometimes.
It fixes it when switching from a window host to a side or bottom host, and back, but the problem remains when switching from a side host to a bottom host, and back. And I can't figure out how to re-assign the focus. It seems lost somehow, and the only way to make it come back is to press tab, which focuses the address bar in the browser tab.
Attached patch bug1022726.diffSplinter Review
I have no idea why, but this works on my mac.
Brian, did you investigate this issue while working on bug 1119133? If you have any idea why simply focusing the window once doesn't work when going from side to bottom, I'm all ears.
Flags: needinfo?(bgrinstead)
I never figured it out.  I suspected it had something to do with the call to swapFrameLoaders though.  Your patch actually works though!  Tested on osx and windows.  So nice job figuring it out :)
Flags: needinfo?(bgrinstead)
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
OS: Mac OS X → Unspecified
Hardware: x86 → Unspecified
/r/9051 - Bug 1022726 - Focus the devtools window after switching host type

Pull down this commit:

hg pull -r 934ac81b6b37bd8ab5526477556f7693a958adcb https://reviewboard-hg.mozilla.org/gecko/
Attachment #8607544 - Flags: review?(bgrinstead)
mozreview shows one of the tests as deleted/created, but this was just a 'hg mv'
Comment on attachment 8607544 [details]
MozReview Request: bz://1022726/pbrosset

https://reviewboard.mozilla.org/r/9049/#review7651

Ship It!
Attachment #8607544 - Flags: review?(bgrinstead) → review+
Would love this for 40.1.
Whiteboard: [devedition-40][difficulty=easy] → [devedition-40][difficulty=hard]
Version: 16 Branch → 41 Branch
(In reply to Jeff Griffiths (:canuckistani) from comment #11)
> Would love this for 40.1.
Ok, so the patch is R+, which is a start, but it looks like a few tests are failing with it. So I hope I can fix this quickly and in on time for 40.1.
New try push with a correction I made to the test:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5464d4c9643d
Let's see if that sticks and lands in m-c. If yes and we still have time, I'll request aurora-uplift so we get it in 40.
https://hg.mozilla.org/mozilla-central/rev/e261c91790f3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
This is the patch that finally landed (after I made the last test modifications).
Asking for aurora-uplift as requested by Jeff.

Approval Request Comment
[Feature/regressing bug #]: This isn't related to a recent half-finished feature nor a regression. This is just something that wasn't implemented a long time ago.
[User impact if declined]: If declined, the user experience using the devtools is impacted: when you switch from a host type to another host type (from bottom docked to a detached window for example), the keyboard shortcuts don't work straight away, you first need to click in the toolbox to give it focus, which defeats the whole purpose of using the keyboard.
[Describe test coverage new/current, TreeHerder]: Has been on m-c for a few days, including a new mochitest.
[Risks and why]: The code change in this patch is 2 lines of window focusing code when switching devtools host, so there is no risk for the browser itself. The only (minor) risk is for devtools users to switch host, if these 2 lines misbehave, but the test I added hasn't failed since it landed.
[String/UUID change made/needed]: None.
Attachment #8610062 - Flags: approval-mozilla-aurora?
Comment on attachment 8610062 [details] [diff] [review]
bug1022726-focus-toolbox.patch

If it is a long standing bug, it is early in the aurora cycle, it has tests, so, taking it.
Attachment #8610062 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8607544 - Attachment is obsolete: true
Attachment #8618168 - Flags: review+
Whiteboard: [devedition-40][difficulty=hard] → [polish-backlog][difficulty=hard]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: