After switching to fullscreen mode (tested on chrome and safari), I can't type any letters or numbers in text inputs, but I still can enter special characters like *¨%£
but no simple letters...
The code is really simple :
HTML
<button type="button" id="fullScreen">LAUNCH FULLSCREEN</button>
<input type="text" />
JS
function launchFullScreen(element) {
if(element.requestFullScreen) {
element.requestFullScreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
}
document.getElementById("fullScreen").addEventListener("mousedown", function(){
launchFullScreen(document.documentElement);
}, false);
As Jan Dvorak mentioned, the problem appears only when using the js function, the bug doesn't appears when using the browser build-in fullscreen button/shortcut
See it in action :
http://jsfiddle.net/QwqT7/show/
UPDATE 2 :
Just tested on Firefox for mac, no problems in fullscreen mode. It seems that the problem is webkit only.
Full-screen can be activated for the whole browser window by pressing the F11 key. It can be exited by pressing the Esc button.
To enable a full-screen view on a user's browser, you will first need to ask for permission to do so with the Element. requestFullScreen function.
The fastest way to run Google Chrome in full-screen mode is to press the F11 key on your keyboard.
Full screen mode allows you to watch videos that take up your entire screen.
It's not a perfect solution, but at least it will allow Chrome to responds to keyboard commands and let Safari use the fullscreen mode without key inputs as a fallback.
function launchFullScreen(element) {
if(element.requestFullScreen) {
element.requestFullScreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)){
element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
setTimeout(function() {
if (!document.webkitCurrentFullScreenElement && element.webkitRequestFullScreen()) {
element.webkitRequestFullScreen();
}
},100);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With