Can't open buttons with subviews in overflow panel
Categories
(Firefox :: Toolbars and Customization, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox66 | --- | unaffected |
firefox67 | --- | unaffected |
firefox68 | --- | fixed |
People
(Reporter: Gijs, Assigned: Jamie)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Looking for a regression window, but basically, str:
- pin library button in the overflow menu
- tab to overflow buton
- hit space/enter
- navigate to library button if necessary (with tab/arrow)
- hit space/enter/right-arrow
ER:
open subview
AR:
no subview
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Curiously, this doesn't happen for the Forget button (panic-button), but does for the Library button.
Assignee | ||
Comment 3•5 years ago
|
||
Ug. I almost wish I hadn't opened this can of keyboard worms. :(
This didn't happen before bug 1477673 because we didn't use PMV key nav for the overflow panel before then.
I think this happens because:
- library-button explicitly defines onmousedown and onkeypress events, but not oncommand. (I guess it needs to do mousedown to support drag, and because of that, it needed keypress to manage setting panel focus properly, since we're not relying on CustomizableUI to do that.)
- PMV key nav (which runs on keydown, thus before library-button's keypress) simulates a command event and a click event. It does not simulate a mousedown event.
The intuitive fix is to change library-button's keypress handler to keydown so it runs before PMV keydown. Unfortunately, that would mean focus wouldn't be set properly when opening this from the overflow menu with the keyboard, since that needs to be handled within PMV key nav.
Another option is to change PanelMultiView.showSubView to take a boolean isKeyPress argument (or an event argument) and have PanelUI.showSubView pass that. This would be another way to trigger the initial focus behaviour for sub-views.
Gijs, thoughts?
Assignee | ||
Comment 4•5 years ago
|
||
Oh, a third option is to add an oncommand handler to library-button. However, I'm not sure how that would interact with the existing mousedown and keypress handlers. In particular, the command event handles keyup for space, not keydown or keypress, which might cause some pain; I ran into a bunch of trouble with that when working on toolbar key nav.
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to James Teh [:Jamie] from comment #3)
Another option is to change PanelMultiView.showSubView to take a boolean isKeyPress argument (or an event argument) and have PanelUI.showSubView pass that. This would be another way to trigger the initial focus behaviour for sub-views.
I realised that only works if you change library-button's keypress handler to a keydown handler. And:
The intuitive fix is to change library-button's keypress handler to keydown so it runs before PMV keydown.
PMV keydown is a capturing handler, so it doesn't matter what we do, library-button's handlers will never run first.
Assignee | ||
Comment 6•5 years ago
|
||
Previously, we sent a command event and a click event.
Normally, the command event executes the action, then the click event closes the menu.
However, in some cases (e.g. the Library button), there is no command event handler and the mousedown event executes the action instead.
Reporter | ||
Comment 7•5 years ago
|
||
I've r+'d the patch so I think I can clear this, let me know if I missed something.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/041741ce1646 PanelMultiView: Send mousedown event when activating a button via the keyboard. r=Gijs
Comment 9•5 years ago
|
||
Backed out 2 changesets (bug 1545766, bug 1546633) for causing browser_PanelMultiView_keyboard.js to perma fail
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel%2Crunnable&selectedJob=243835504&revision=041741ce164674137968c39aab0a9c80e84c99db
backout: https://hg.mozilla.org/integration/autoland/rev/47ea779dc66b06fdcc4a247fbe29bf9770cefa8b
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6903c331545 PanelMultiView: Send mousedown event when activating a button via the keyboard. r=Gijs
Comment 11•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•2 years ago
|
Description
•