allow full keyboard control in fullscreen using chrome #1881
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
e1e59953f4
commit
f95dbdd404
|
@ -9689,6 +9689,7 @@
|
||||||
|
|
||||||
// Enter browser fullscreen
|
// Enter browser fullscreen
|
||||||
function enterBrowserFullscreen(elem) {
|
function enterBrowserFullscreen(elem) {
|
||||||
|
if (navigator.keyboard && navigator.keyboard.lock) { navigator.keyboard.lock(); }
|
||||||
if (elem.requestFullscreen) { elem.requestFullscreen(); }
|
if (elem.requestFullscreen) { elem.requestFullscreen(); }
|
||||||
else if (elem.msRequestFullscreen) { elem.msRequestFullscreen(); }
|
else if (elem.msRequestFullscreen) { elem.msRequestFullscreen(); }
|
||||||
else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); }
|
else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); }
|
||||||
|
@ -9701,6 +9702,7 @@
|
||||||
else if (document.msExitFullscreen) { document.msExitFullscreen(); }
|
else if (document.msExitFullscreen) { document.msExitFullscreen(); }
|
||||||
else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); }
|
else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); }
|
||||||
else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
|
else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
|
||||||
|
if (navigator.keyboard && navigator.keyboard.unlock) { navigator.keyboard.unlock(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if the browser is fullscreen. This is a delayed method that will return true/false late. Not very useful.
|
// Return true if the browser is fullscreen. This is a delayed method that will return true/false late. Not very useful.
|
||||||
|
|
Loading…
Reference in New Issue