[PALEMOON] Align the application with the updated fullscreen API

This commit is contained in:
JustOff 2018-05-01 14:30:38 +03:00 committed by Roy Tam
commit 4656ff95ec
2 changed files with 4 additions and 8 deletions

View file

@ -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);

View file

@ -2533,8 +2533,8 @@ function BrowserFullScreen()
window.fullScreen = !window.fullScreen;
}
function onFullScreen(event) {
FullScreen.toggle(event);
function onFullScreen() {
FullScreen.toggle();
}
function onMozEnteredDomFullscreen(event) {