Bug 846422 - Hide context menus when popups appear [r=mbrubeck]

This commit is contained in:
Rodrigo Silveira 2013-03-26 18:45:11 -07:00
Родитель 1c780fbb1a
Коммит d88a1e9368
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -343,6 +343,7 @@ MenuPopup.prototype = {
window.addEventListener("keypress", this, true);
window.addEventListener("mousedown", this, true);
Elements.stack.addEventListener("PopupChanged", this, false);
this._panel.hidden = false;
this._position(aPositionOptions || {});
@ -372,6 +373,7 @@ MenuPopup.prototype = {
window.removeEventListener("keypress", this, true);
window.removeEventListener("mousedown", this, true);
Elements.stack.removeEventListener("PopupChanged", this, false);
let self = this;
this._panel.addEventListener("transitionend", function () {
@ -494,6 +496,11 @@ MenuPopup.prototype = {
this.hide();
}
break;
case "PopupChanged":
if (aEvent.detail) {
this.hide();
}
break;
}
}
};