mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[PALEMOON] Align the application with the updated fullscreen API
This commit is contained in:
parent
211c4325ba
commit
4656ff95ec
2 changed files with 4 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -2533,8 +2533,8 @@ function BrowserFullScreen()
|
|||
window.fullScreen = !window.fullScreen;
|
||||
}
|
||||
|
||||
function onFullScreen(event) {
|
||||
FullScreen.toggle(event);
|
||||
function onFullScreen() {
|
||||
FullScreen.toggle();
|
||||
}
|
||||
|
||||
function onMozEnteredDomFullscreen(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue