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() {
|
||||
if (fullscreenElement()) {
|
||||
exitFullscreen();
|
||||
}
|
||||
showScene(keys);
|
||||
if (history.state != "keys") {
|
||||
history.pushState("keys", "");
|
||||
|
|
@ -326,7 +328,9 @@ window.addEventListener("load", function() {
|
|||
}
|
||||
|
||||
function showKeyboard() {
|
||||
if (fullscreenElement()) {
|
||||
exitFullscreen();
|
||||
}
|
||||
showScene(keyboard);
|
||||
text.focus();
|
||||
if (history.state != "keyboard") {
|
||||
|
|
@ -359,7 +363,9 @@ window.addEventListener("load", function() {
|
|||
};
|
||||
|
||||
ws.onclose = function() {
|
||||
if (fullscreenElement()) {
|
||||
exitFullscreen();
|
||||
}
|
||||
showScene(closed);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue