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:
Vivien Nicolas 2010-08-27 10:24:17 +02:00
parent 81a9c17bc2
commit b7e81196ec
2 changed files with 14 additions and 13 deletions

View File

@ -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)

View File

@ -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))