From 8d439c38e204f1fde36ad8cfabd224712a939e43 Mon Sep 17 00:00:00 2001 From: JustOff Date: Tue, 1 May 2018 14:30:38 +0300 Subject: [PALEMOON] Align the application with the updated fullscreen API --- application/palemoon/base/content/browser-fullScreen.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'application/palemoon/base/content/browser-fullScreen.js') diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js index 961699064..ffe1da450 100644 --- a/application/palemoon/base/content/browser-fullScreen.js +++ b/application/palemoon/base/content/browser-fullScreen.js @@ -6,13 +6,9 @@ var FullScreen = { _XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - toggle: function (event) { + toggle: function () { var enterFS = window.fullScreen; - // We get the fullscreen event _before_ the window transitions into or out of FS mode. - if (event && event.type == "fullscreen") - enterFS = !enterFS; - // Toggle the View:FullScreen command, which controls elements like the // fullscreen menuitem, menubars, and the appmenu. let fullscreenCommand = document.getElementById("View:FullScreen"); @@ -140,7 +136,7 @@ var FullScreen = { }, cleanup: function () { - if (window.fullScreen) { + if (!window.fullScreen) { MousePosTracker.removeListener(this); document.removeEventListener("keypress", this._keyToggleCallback, false); document.removeEventListener("popupshown", this._setPopupOpen, false); -- cgit v1.2.3