зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1461366 - Focus the Browser Console window after opening;r=nchevobbe
This allows keyboard shortcuts to work right away when the input field isn't present. MozReview-Commit-ID: COmmybkUu0m --HG-- extra : rebase_source : 1e40fc7be3e97b990b1b3839482618eb9b7f166b
This commit is contained in:
Родитель
643475f237
Коммит
7a27eea620
|
@ -241,6 +241,10 @@ NewWebConsoleFrame.prototype = {
|
|||
shortcuts.on(clearShortcut, () => this.jsterm.clearOutput(true));
|
||||
|
||||
if (this.isBrowserConsole) {
|
||||
// Make sure keyboard shortcuts work immediately after opening
|
||||
// the Browser Console (Bug 1461366).
|
||||
this.window.focus();
|
||||
|
||||
shortcuts.on(l10n.getStr("webconsole.close.key"),
|
||||
this.window.top.close.bind(this.window.top));
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ add_task(async function() {
|
|||
|
||||
hud = HUDService.getBrowserConsole();
|
||||
|
||||
ok(hud.ui.document.hasFocus(), "Focus in the document");
|
||||
|
||||
console.log(TEST_MESSAGE);
|
||||
|
||||
await waitFor(() => findMessage(hud, TEST_MESSAGE));
|
||||
|
|
Загрузка…
Ссылка в новой задаче