зеркало из https://github.com/mozilla/gecko-dev.git
Bug 591133 - Identity button should open the Open Search popup list when touching the Menu button on Android [r=mbrubeck,mfinkle]
This commit is contained in:
Родитель
cbe9ff3ff3
Коммит
c0e4d3108f
|
@ -677,6 +677,13 @@ var BrowserUI = {
|
|||
handleEscape: function (aEvent) {
|
||||
aEvent.stopPropagation();
|
||||
|
||||
// Check open popups
|
||||
if (this._popup) {
|
||||
this._hidePopup();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check active panel
|
||||
if (BrowserUI.activePanel) {
|
||||
BrowserUI.activePanel = null;
|
||||
return;
|
||||
|
@ -689,12 +696,6 @@ var BrowserUI = {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check open popups
|
||||
if (this._popup) {
|
||||
this._hidePopup();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check open modal elements
|
||||
let modalElementsLength = document.getElementsByClassName("modal-block").length;
|
||||
if (modalElementsLength > 0)
|
||||
|
|
|
@ -1926,6 +1926,13 @@ IdentityHandler.prototype = {
|
|||
},
|
||||
|
||||
toggle: function ih_toggle() {
|
||||
// When the urlbar is active the identity button is used to show the
|
||||
// list of search engines
|
||||
if (Elements.urlbarState.getAttribute("mode") == "edit") {
|
||||
CommandUpdater.doCommand("cmd_opensearch");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._identityPopup.hidden)
|
||||
this.show();
|
||||
else
|
||||
|
@ -1938,13 +1945,6 @@ IdentityHandler.prototype = {
|
|||
handleIdentityButtonEvent: function(aEvent) {
|
||||
aEvent.stopPropagation();
|
||||
|
||||
// When the urlbar is active the identity button is used to show the
|
||||
// list of search engines
|
||||
if (Elements.urlbarState.getAttribute("mode") == "edit") {
|
||||
CommandUpdater.doCommand("cmd_opensearch");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((aEvent.type == "click" && aEvent.button != 0) ||
|
||||
(aEvent.type == "keypress" && aEvent.charCode != KeyEvent.DOM_VK_SPACE &&
|
||||
aEvent.keyCode != KeyEvent.DOM_VK_RETURN))
|
||||
|
|
Загрузка…
Ссылка в новой задаче