diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-05-01 14:08:41 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-05-01 14:08:41 +0300 |
commit | 6d579486a9e0032ccab769f77d3329fe3b9f57c8 (patch) | |
tree | 176c820abc67d13c2707411ac32209586084d8fd /application | |
parent | d0c19e4607964c04109e12399e98e86b331edd0f (diff) | |
download | uxp-6d579486a9e0032ccab769f77d3329fe3b9f57c8.tar.gz |
[PALEMOON] fullscr-toggler element needs to be hidden in DOM fullscreen
Diffstat (limited to 'application')
-rw-r--r-- | application/palemoon/base/content/browser-fullScreen.js | 28 | ||||
-rw-r--r-- | application/palemoon/base/content/browser.xul | 2 |
2 files changed, 9 insertions, 21 deletions
diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js index 73b10ae850..b302a03e0e 100644 --- a/application/palemoon/base/content/browser-fullScreen.js +++ b/application/palemoon/base/content/browser-fullScreen.js @@ -5,10 +5,7 @@ var FullScreen = { _XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - get _fullScrToggler() { - delete this._fullScrToggler; - return this._fullScrToggler = document.getElementById("fullscr-toggler"); - }, + toggle: function (event) { var enterFS = window.fullScreen; @@ -31,6 +28,12 @@ var FullScreen = { document.getElementById("exitFullScreenItem").hidden = !enterFS; #endif + if (!this._fullScrToggler) { + this._fullScrToggler = document.getElementById("fullscr-toggler"); + this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false); + this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false); + } + // On OS X Lion we don't want to hide toolbars when entering fullscreen, unless // we're entering DOM fullscreen, in which case we should hide the toolbars. // If we're leaving fullscreen, then we'll go through the exit code below to @@ -50,14 +53,6 @@ var FullScreen = { this.showXULChrome("toolbar", !enterFS); if (enterFS) { - // Add a tiny toolbar to receive mouseover and dragenter events, and provide affordance. - // This will help simulate the "collapse" metaphor while also requiring less code and - // events than raw listening of mouse coords. We don't add the toolbar in DOM full-screen - // mode, only browser full-screen mode. - if (!document.mozFullScreen) { - this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false); - this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false); - } if (gPrefService.getBoolPref("browser.fullscreen.autohide")) gBrowser.mPanelContainer.addEventListener("mousemove", this._collapseCallback, false); @@ -154,11 +149,6 @@ var FullScreen = { // the toolbar hide immediately. this._cancelAnimation(); this.mouseoverToggle(false); - - // Remove listeners on the full-screen toggler, so that mouseover - // the top of the screen will not cause the toolbar to re-appear. - this._fullScrToggler.removeEventListener("mouseover", this._expandCallback, false); - this._fullScrToggler.removeEventListener("dragenter", this._expandCallback, false); }, cleanup: function () { @@ -170,8 +160,6 @@ var FullScreen = { document.removeEventListener("popuphidden", this._setPopupOpen, false); gPrefService.removeObserver("browser.fullscreen", this); - this._fullScrToggler.removeEventListener("mouseover", this._expandCallback, false); - this._fullScrToggler.removeEventListener("dragenter", this._expandCallback, false); this.cancelWarning(); gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen); gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen); @@ -502,7 +490,7 @@ var FullScreen = { gNavToolbox.style.marginTop = aShow ? "" : -gNavToolbox.getBoundingClientRect().height + "px"; - this._fullScrToggler.collapsed = aShow; + this._fullScrToggler.hidden = aShow || document.mozFullScreen; this._isChromeCollapsed = !aShow; if (gPrefService.getIntPref("browser.fullscreen.animateUp") == 2) this._shouldAnimate = true; diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul index c2553f2956..9b37f7b6fc 100644 --- a/application/palemoon/base/content/browser.xul +++ b/application/palemoon/base/content/browser.xul @@ -941,7 +941,7 @@ </toolbarpalette> </toolbox> - <hbox id="fullscr-toggler" collapsed="true"/> + <hbox id="fullscr-toggler" hidden="true"/> <hbox flex="1" id="browser"> <vbox id="browser-border-start" hidden="true" layer="true"/> |