sindresorhus/screenfull

User-initiated fullscreen is not detected by isFullscreen

Opened this issue · 2 comments

When the user goes fullscreen by pressing F11 screenfull.isFullscreen stays false. Tested using the demo page on Chrome, Firefox, and Edge.

When the user goes fullscreen by pressing F11 screenfull.isFullscreen stays false. Tested using the demo page on Chrome, Firefox, and Edge.

you can listen the window's keydown event, when the event key equals 'F11', call the method preventDefault() and then call screenfull.toggle()