Exit full screen mode with the F11 key and the Esc key?

Most modern browsers support JavaScript APIs for requesting full screen mode. By default, the user can always click F11to view the page in full screen mode.

If, however, the developer chooses to request full screen mode on his own in a JavaScript event, this mode can be terminated using the Escand keys F11.

Please note that if users request full screen mode using the default key (using F11), it (tested on the newest versions of Chromium and Firefox) is not available using the key Esc.

Obviously this makes the user interfaces a bit inconsistent. Unfortunately, both of these browsers don't seem to register your EventListeners for Escafter full screen viewing, as they are a good security choice.

Is it possible to use this browser API and still be aware of how users can leave full screen, i.e. can I make Escthe browser full screen too F11?

+3


source to share





All Articles