summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-07-18 19:12:20 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-07-18 19:12:20 -0400
commit8349f4eb228e5ea2d19035da05591e65cf496e14 (patch)
tree1cb2edf5156ae26c1bae7e998e929d64bf8b510f /base
parentd138d78a1e01cf7d196b8acfbf6203351d11ed1c (diff)
downloadiceweasel-uxp-8349f4eb228e5ea2d19035da05591e65cf496e14.tar.gz
backport: #336 - Fixes F11 on New Tab and blank pages
Diffstat (limited to 'base')
-rw-r--r--base/content/browser-fullScreenAndPointerLock.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/content/browser-fullScreenAndPointerLock.js b/base/content/browser-fullScreenAndPointerLock.js
index 497e511..dbc9478 100644
--- a/base/content/browser-fullScreenAndPointerLock.js
+++ b/base/content/browser-fullScreenAndPointerLock.js
@@ -320,6 +320,18 @@ var FullScreen = {
document.addEventListener("keypress", this._keyToggleCallback, false);
document.addEventListener("popupshown", this._setPopupOpen, false);
document.addEventListener("popuphidden", this._setPopupOpen, false);
+ // 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()) {
+ let rect = gBrowser.mPanelContainer.getBoundingClientRect();
+ this._mouseTargetRect = {
+ top: rect.top + 50,
+ bottom: rect.bottom,
+ left: rect.left,
+ right: rect.right
+ };
+ MousePosTracker.addListener(this);
+ }
// In DOM fullscreen mode, we hide toolbars with CSS
if (!document.fullscreenElement)
this.hideNavToolbox(true);