diff --git a/webdata/fn.js b/webdata/fn.js index 9a018b2..627b748 100644 --- a/webdata/fn.js +++ b/webdata/fn.js @@ -318,7 +318,9 @@ window.addEventListener("load", function() { } function showKeys() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(keys); if (history.state != "keys") { history.pushState("keys", ""); @@ -326,7 +328,9 @@ window.addEventListener("load", function() { } function showKeyboard() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(keyboard); text.focus(); if (history.state != "keyboard") { @@ -359,7 +363,9 @@ window.addEventListener("load", function() { }; ws.onclose = function() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(closed); };