exit fullscreen for multimedia keys

This commit is contained in:
Unrud 2018-10-01 07:35:54 +02:00
parent 491aa2fd3c
commit 9901e9e9ec
2 changed files with 5 additions and 8 deletions

View file

@ -354,9 +354,7 @@ window.addEventListener("load", function() {
};
ws.onclose = function() {
if (fullscreenElement()) {
exitFullscreen();
}
exitFullscreen();
opening.style.display = "none";
pad.style.display = "none";
keys.style.display = "none";
@ -366,15 +364,14 @@ window.addEventListener("load", function() {
document.getElementById("keysbutton").addEventListener("click",
function(e) {
exitFullscreen();
pad.style.display = "none";
keys.style.display = "flex";
history.pushState("keys", "");
});
document.getElementById("keyboardbutton").addEventListener("click",
function(e) {
if (fullscreenElement()) {
exitFullscreen();
}
exitFullscreen();
pad.style.display = "none";
keyboard.style.display = "flex";
text.focus();