This is source code for exit from fullscreen mode:
var cancelFullScreen = document.webkitCancelFullScreen || document.mozCancelFullScreen;
cancelFullScreen.call(document);
it’s works correctly when i enter fullscreen using function startFullScreen, but don’t work after pressing F11 key – browser won’t exit fullscreen mode. Browsers Chrome 18 and Firefox 12. Why it’s happens? Is it bug, security restriction or some other? Is it possible to fix it?
F11 and
requestFullScreenare the different things in browsers.requestFullScreenrequires permissions from users while pressing F11 is not.Also as you may see they have different interface. For example opening window in fullscreen mode (using JS) in Google Chrome don’t tell user that he can go out pressing F11 while native fullscreen do.