sindresorhus / screenfull

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API
https://sindresorhus.com/screenfull
MIT License
7.08k stars 698 forks source link

screenfull.request doesn't work inside keyup/keydown/keypress handler in IE11 #85

Closed jraoatlogic closed 9 years ago

jraoatlogic commented 9 years ago

Modified the index.html in release zip by adding the following codes:

            /*
            $(document).keydown(function(e) {                
                    screenfull.request($('#container')[0]);
            });            
            */
            /*
            $(document).keyup(function(e) {                
                    screenfull.request($('#container')[0]);
            });
            */
            /*
            $(document).keypress(function(e) {                
                    screenfull.request($('#container')[0]);
            });
            */

Tried each event handler separately under IE 11.0.21, the fullscreen mode couldn't be triggered when pressing key on browser.

koko236 commented 9 years ago

See this: http://caniuse.com/#feat=fullscreen -> Issues -> Issue 4. Seems to be an IE11 'feature'.