After switching to a different toolbox host, make sure the toolbox window
receives the focus so that the toolbox keyboard shortcuts (like move to next
or previous tool) still work.
Two keyboard shortcuts can toggle the devtools : F12 and CTRL+SHIFT+I/CMD+ALT+I.
Currently, with detached devtools, pressing a toggle key from the main window
closes the devtools window. Pressing a toggle key from the devtools window
itself has no effect.
The goal of this changeset is to :
- focus devtools window when pressing a toggle key in the main window
- close devtools window when pressing a toggle key in the devtools window
Modified toggleToolboxCommand in browser/devtools/framework/gDevTools.jsm to
destroy the toolbox only if it is "docked" (exists and the hostType is not
WINDOW).
Modified browser/devtools/framework/toolbox-window.xul and
browser/locales/en-US/chrome/browser/devtools/toolbox.dtd so that F12 and
CTRL+SHIFT+I/CMD+SHIFT+I also close the devtools window when used inside the
devtools window
Added mochitest browser_toolbox_toggle.js