mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1177176 - Make the Control Center panel sticky when opened via UITour.showMenu. r=bgrins
@noautohide makes the panel sticky like we do for the appMenu and loop.
This commit is contained in:
parent
02376a6392
commit
85d935fa8e
@ -879,6 +879,7 @@ this.UITour = {
|
||||
loopPanel.removeEventListener("popuphidden", this.onPanelHidden);
|
||||
loopPanel.removeEventListener("popuphiding", this.hideLoopPanelAnnotations);
|
||||
let controlCenterPanel = aWindow.gIdentityHandler._identityPopup;
|
||||
controlCenterPanel.removeEventListener("popuphidden", this.onPanelHidden);
|
||||
controlCenterPanel.removeEventListener("popuphiding", this.hideControlCenterAnnotations);
|
||||
|
||||
this.endUrlbarCapture(aWindow);
|
||||
@ -1565,6 +1566,10 @@ this.UITour = {
|
||||
// Add the listener even if the panel is already open since it will still
|
||||
// only get registered once even if it was UITour that opened it.
|
||||
popup.addEventListener("popuphiding", this.hideControlCenterAnnotations);
|
||||
popup.addEventListener("popuphidden", this.onPanelHidden);
|
||||
|
||||
popup.setAttribute("noautohide", true);
|
||||
this.availableTargetsCache.clear();
|
||||
|
||||
if (popup.state == "open") {
|
||||
if (aOpenCallback) {
|
||||
@ -1573,6 +1578,8 @@ this.UITour = {
|
||||
return;
|
||||
}
|
||||
|
||||
this.recreatePopup(popup);
|
||||
|
||||
// Open the control center
|
||||
if (aOpenCallback) {
|
||||
popup.addEventListener("popupshown", onPopupShown);
|
||||
@ -1718,6 +1725,7 @@ this.UITour = {
|
||||
onPanelHidden: function(aEvent) {
|
||||
aEvent.target.removeAttribute("noautohide");
|
||||
UITour.recreatePopup(aEvent.target);
|
||||
this.availableTargetsCache.clear();
|
||||
},
|
||||
|
||||
recreatePopup: function(aPanel) {
|
||||
|
Loading…
Reference in New Issue
Block a user