зеркало из https://github.com/mozilla/gecko-dev.git
Bug 846422 - Hide context menus when popups appear [r=mbrubeck]
This commit is contained in:
Родитель
1c780fbb1a
Коммит
d88a1e9368
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче