Only exit fullscreen when in fullscreen mode
This commit is contained in:
parent
9ad8590517
commit
1f410b5a18
1 changed files with 9 additions and 3 deletions
|
|
@ -318,7 +318,9 @@ window.addEventListener("load", function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showKeys() {
|
function showKeys() {
|
||||||
|
if (fullscreenElement()) {
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
|
}
|
||||||
showScene(keys);
|
showScene(keys);
|
||||||
if (history.state != "keys") {
|
if (history.state != "keys") {
|
||||||
history.pushState("keys", "");
|
history.pushState("keys", "");
|
||||||
|
|
@ -326,7 +328,9 @@ window.addEventListener("load", function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showKeyboard() {
|
function showKeyboard() {
|
||||||
|
if (fullscreenElement()) {
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
|
}
|
||||||
showScene(keyboard);
|
showScene(keyboard);
|
||||||
text.focus();
|
text.focus();
|
||||||
if (history.state != "keyboard") {
|
if (history.state != "keyboard") {
|
||||||
|
|
@ -359,7 +363,9 @@ window.addEventListener("load", function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
ws.onclose = function() {
|
ws.onclose = function() {
|
||||||
|
if (fullscreenElement()) {
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
|
}
|
||||||
showScene(closed);
|
showScene(closed);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue