summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content
diff options
context:
space:
mode:
authorFranklin DM <mrmineshafter17@gmail.com>2018-07-13 14:21:38 +0800
committerGitHub <noreply@github.com>2018-07-13 14:21:38 +0800
commitd479089211e38cd57680e40ba0def97cc5e97b7c (patch)
tree43f084553dc26431107ffa4fbac44b936ab537f9 /application/palemoon/base/content
parent012c67fbe00dcb65caa1d34c41400485123e9759 (diff)
downloadUXP-d479089211e38cd57680e40ba0def97cc5e97b7c.tar
UXP-d479089211e38cd57680e40ba0def97cc5e97b7c.tar.gz
UXP-d479089211e38cd57680e40ba0def97cc5e97b7c.tar.lz
UXP-d479089211e38cd57680e40ba0def97cc5e97b7c.tar.xz
UXP-d479089211e38cd57680e40ba0def97cc5e97b7c.zip
Issue #336: Mouse position tracker not set even if chrome is still visible on fullscreen
Diffstat (limited to 'application/palemoon/base/content')
-rw-r--r--application/palemoon/base/content/browser-fullScreen.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js
index 6afd247be..b1235a8d3 100644
--- a/application/palemoon/base/content/browser-fullScreen.js
+++ b/application/palemoon/base/content/browser-fullScreen.js
@@ -53,6 +53,18 @@ var FullScreen = {
document.addEventListener("popupshown", this._setPopupOpen, false);
document.addEventListener("popuphidden", this._setPopupOpen, false);
this._shouldAnimate = true;
+ // If it is not safe to collapse, add the mouse position tracker or
+ // else it won't be possible to hide the navigation toolbox again
+ if (!this._safeToCollapse(document.mozFullScreen)) {
+ let rect = gBrowser.mPanelContainer.getBoundingClientRect();
+ this._mouseTargetRect = {
+ top: rect.top + 50,
+ bottom: rect.bottom,
+ left: rect.left,
+ right: rect.right
+ };
+ MousePosTracker.addListener(this);
+ }
// We don't animate the toolbar collapse if in DOM full-screen mode,
// as the size of the content area would still be changing after the
// mozfullscreenchange event fired, which could confuse content script.