gecko-dev/browser/base/content/test/keyboard
James Teh 8810a3c233 Bug 1540918: When a panel is opened from the toolbar via the keyboard, restore focus to the toolbar button when the panel is closed. r=Gijs
Toolbar buttons are only made focusable when accessed via the keyboard.
As soon as they lose focus, their focusability is removed.
This is done so that clicking them doesn't focus them.
Previously, this meant that if a panel opened, focus couldn't be restored to the button like it should be when the panel was closed, as the button was no longer focusable.
To work around this, use the open="true" attribute set on the button when the panel opens.
If this is detected when the button loses focus, focusability is not removed.
Once focus is restored after the panel closes, things continue as normal.
That is, when the button loses focus for some other reason, its focusability is removed.

Differential Revision: https://phabricator.services.mozilla.com/D26073

--HG--
extra : moz-landing-system : lando
2019-04-04 17:04:18 +00:00
..
.eslintrc.js
browser_toolbarButtonKeyPress.js Bug 1536521: Use a capturing listener for PanelMultiView's keydown handler. r=Gijs 2019-03-26 10:33:11 +00:00
browser_toolbarKeyNav.js Bug 1540918: When a panel is opened from the toolbar via the keyboard, restore focus to the toolbar button when the panel is closed. r=Gijs 2019-04-04 17:04:18 +00:00
browser.ini Bug 1536521: Use a capturing listener for PanelMultiView's keydown handler. r=Gijs 2019-03-26 10:33:11 +00:00
head.js Bug 1536521: Use a capturing listener for PanelMultiView's keydown handler. r=Gijs 2019-03-26 10:33:11 +00:00