feat: Prevent exiting full screen when pressing the ESC key (#122)
For chromium based browsers (or future browsers that add support for the keyboard api) this will keep the escape key from exiting full screen and instead require a long key press.
This commit is contained in:
parent
2ce431a3b1
commit
5d468a3fe1
|
@ -1887,6 +1887,9 @@ const UI = {
|
||||||
} else if (document.body.msRequestFullscreen) {
|
} else if (document.body.msRequestFullscreen) {
|
||||||
document.body.msRequestFullscreen();
|
document.body.msRequestFullscreen();
|
||||||
}
|
}
|
||||||
|
if(navigator.keyboard && navigator.keyboard.lock){
|
||||||
|
navigator.keyboard.lock(['Escape']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UI.updateFullscreenButton();
|
UI.updateFullscreenButton();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue