зеркало из https://github.com/mozilla/pjs.git
Back out 52d001bbf7ff (Bug 690011) for failures in Android b-c (browser_find.js and others) on a CLOSED TREE
This commit is contained in:
Родитель
eaf62b2e5a
Коммит
c1adea59b2
|
@ -399,25 +399,14 @@ var BrowserUI = {
|
||||||
},
|
},
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
let edit = this._edit = document.getElementById("urlbar-edit");
|
this._edit = document.getElementById("urlbar-edit");
|
||||||
this._title = document.getElementById("urlbar-title");
|
this._title = document.getElementById("urlbar-title");
|
||||||
this._throbber = document.getElementById("urlbar-throbber");
|
this._throbber = document.getElementById("urlbar-throbber");
|
||||||
this._favicon = document.getElementById("urlbar-favicon");
|
this._favicon = document.getElementById("urlbar-favicon");
|
||||||
this._favicon.addEventListener("error", this, false);
|
this._favicon.addEventListener("error", this, false);
|
||||||
|
|
||||||
edit.addEventListener("click", this, false);
|
this._edit.addEventListener("click", this, false);
|
||||||
|
this._edit.addEventListener("mousedown", this, false);
|
||||||
// Delay urlbar binding initialization until the user interact with it
|
|
||||||
function urlbarBindOnFocus() {
|
|
||||||
if (!edit.hasAttribute("delaybinding"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
window.removeEventListener("mousedown", urlbarBindOnFocus, true);
|
|
||||||
window.removeEventListener("keydown", urlbarBindOnFocus, true);
|
|
||||||
edit.removeAttribute("delaybinding");
|
|
||||||
};
|
|
||||||
window.addEventListener("mousedown", urlbarBindOnFocus, true);
|
|
||||||
window.addEventListener("keydown", urlbarBindOnFocus, true);
|
|
||||||
|
|
||||||
window.addEventListener("NavigationPanelShown", this, false);
|
window.addEventListener("NavigationPanelShown", this, false);
|
||||||
window.addEventListener("NavigationPanelHidden", this, false);
|
window.addEventListener("NavigationPanelHidden", this, false);
|
||||||
|
|
|
@ -6,7 +6,7 @@ browser[remote="true"] {
|
||||||
-moz-binding: url("chrome://browser/content/bindings/browser.xml#remote-browser");
|
-moz-binding: url("chrome://browser/content/bindings/browser.xml#remote-browser");
|
||||||
}
|
}
|
||||||
|
|
||||||
#urlbar-edit:not([delaybinding]) {
|
#urlbar-edit {
|
||||||
-moz-binding: url("chrome://browser/content/bindings.xml#autocomplete-aligned");
|
-moz-binding: url("chrome://browser/content/bindings.xml#autocomplete-aligned");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,6 @@
|
||||||
placeholder="&urlbar.emptytext;"
|
placeholder="&urlbar.emptytext;"
|
||||||
collapsed="true"
|
collapsed="true"
|
||||||
flex="1"
|
flex="1"
|
||||||
delaybinding="true"
|
|
||||||
readonly="true"
|
readonly="true"
|
||||||
ontextentered="BrowserUI.goToURI();"
|
ontextentered="BrowserUI.goToURI();"
|
||||||
clickSelectsAll="true"/>
|
clickSelectsAll="true"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче