mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 01:08:21 +00:00
Bug 1453894 - Give focus to console input when closing sidebar with Escape key; r=Honza.
MozReview-Commit-ID: J9y6XkmKJ43 --HG-- extra : rebase_source : 47b3c832cbadde8968527f17aa477148f3fa451a
This commit is contained in:
parent
5aeada7d94
commit
405ab44135
@ -255,6 +255,7 @@ NewWebConsoleFrame.prototype = {
|
||||
shortcuts.on("Esc", event => {
|
||||
if (!this.jsterm.autocompletePopup || !this.jsterm.autocompletePopup.isOpen) {
|
||||
this.newConsoleOutput.dispatchSidebarClose();
|
||||
this.jsterm.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -69,6 +69,8 @@ add_task(async function() {
|
||||
await onSidebarShown;
|
||||
sidebar = hud.ui.document.querySelector(".sidebar");
|
||||
ok(!sidebar, "Sidebar hidden after sending esc");
|
||||
let inputNode = hud.jsterm.inputNode;
|
||||
ok(hasFocus(inputNode), "console input is focused after closing the sidebar");
|
||||
});
|
||||
|
||||
async function showSidebar(hud) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user