Bug 1041678 - CTRL/Command K should goto search bar in new tab if open, rather than opening about:home. r=Gijs, r=adw
This commit is contained in:
@@ -106,6 +106,9 @@ let AboutHomeListener = {
|
||||
case "AboutHome:Update":
|
||||
this.onUpdate(aMessage.data);
|
||||
break;
|
||||
case "AboutHome:FocusInput":
|
||||
this.onFocusInput();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -138,6 +141,7 @@ let AboutHomeListener = {
|
||||
doc.documentElement.setAttribute("hasBrowserHandlers", "true");
|
||||
let self = this;
|
||||
addMessageListener("AboutHome:Update", self);
|
||||
addMessageListener("AboutHome:FocusInput", self);
|
||||
addEventListener("click", this.onClick, true);
|
||||
addEventListener("pagehide", function onPageHide(event) {
|
||||
if (event.target.defaultView.frameElement)
|
||||
@@ -212,6 +216,10 @@ let AboutHomeListener = {
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
onFocusInput: function () {
|
||||
content.document.getElementById("searchText").focus();
|
||||
},
|
||||
};
|
||||
AboutHomeListener.init(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user