Bug 1631229 - make popup hiding exiting fullscreen work correctly for tooltips, r=dao

Differential Revision: https://phabricator.services.mozilla.com/D72461
This commit is contained in:
Gijs Kruitbosch
2020-04-27 09:30:40 +00:00
parent d9f41c373e
commit ac92dd370a

View File

@@ -596,19 +596,17 @@ var FullScreen = {
// Otherwise, they would not affect chrome and the user would expect the chrome to go away.
// e.g. we wouldn't want the autoscroll icon firing this event, so when the user
// toggles chrome when moving mouse to the top, it doesn't go away again.
let target = aEvent.originalTarget;
if (target.localName == "tooltip") {
return;
}
if (
aEvent.type == "popupshown" &&
!FullScreen._isChromeCollapsed &&
aEvent.target.localName != "tooltip" &&
aEvent.target.localName != "window" &&
aEvent.target.getAttribute("nopreventnavboxhide") != "true"
target.getAttribute("nopreventnavboxhide") != "true"
) {
FullScreen._isPopupOpen = true;
} else if (
aEvent.type == "popuphidden" &&
aEvent.target.localName != "tooltip" &&
aEvent.target.localName != "window"
) {
} else if (aEvent.type == "popuphidden") {
FullScreen._isPopupOpen = false;
// Try again to hide toolbar when we close the popup.
FullScreen.hideNavToolbox(true);