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 ++------ application/palemoon/base/content/browser.js | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'application/palemoon') 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); diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index d22e7f140..72d51ce4a 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -2533,8 +2533,8 @@ function BrowserFullScreen() window.fullScreen = !window.fullScreen; } -function onFullScreen(event) { - FullScreen.toggle(event); +function onFullScreen() { + FullScreen.toggle(); } function onMozEnteredDomFullscreen(event) { -- cgit v1.2.3