Bug 966723: exit Customize Mode on menu-button click, not mouse-down. r=mconley, feedback=dao.

This commit is contained in:
Mike de Boer 2014-04-24 16:37:54 +02:00
Родитель d824c31815
Коммит df9a33d649
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -179,10 +179,10 @@ CustomizeMode.prototype = {
// customization mode when pressing ESC.
document.addEventListener("keypress", this);
// Same goes for the menu button - if we're customizing, a mousedown to the
// Same goes for the menu button - if we're customizing, a click on the
// menu button means a quick exit from customization mode.
window.PanelUI.hide();
window.PanelUI.menuButton.addEventListener("mousedown", this);
window.PanelUI.menuButton.addEventListener("command", this);
window.PanelUI.menuButton.open = true;
window.PanelUI.beginBatchUpdate();
@ -331,7 +331,7 @@ CustomizeMode.prototype = {
CustomizableUI.removeListener(this);
this.document.removeEventListener("keypress", this);
this.window.PanelUI.menuButton.removeEventListener("mousedown", this);
this.window.PanelUI.menuButton.removeEventListener("command", this);
this.window.PanelUI.menuButton.open = false;
this.window.PanelUI.beginBatchUpdate();
@ -1181,13 +1181,13 @@ CustomizeMode.prototype = {
case "dragend":
this._onDragEnd(aEvent);
break;
case "mousedown":
if (aEvent.button == 0 &&
(aEvent.originalTarget == this.window.PanelUI.menuButton)) {
case "command":
if (aEvent.originalTarget == this.window.PanelUI.menuButton) {
this.exit();
aEvent.preventDefault();
return;
}
break;
case "mousedown":
this._onMouseDown(aEvent);
break;
case "mouseup":