chromium – full screen javascript control lose after F11 pressed  [ 993 views ]

During my work I’ve came across a strange issue in chrome (the situation is the same strange in other browsers…). Here is the ticket for the chromium team.

The story is: I try to use the full screen from javascript code. It’s working but we need to say this is like marshland in every browser.

to activate the full screen mode (without full screen support check!)

  function goToFullScreen(){
    var el = document.documentElement,
        fsfn = el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;
    fsfn ? fsfn.call(el) : null;
  };
  function exitFullScreen(){
    document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : null;
    document.mozCancelFullScreen ? document.mozCancelFullScreen() : null;
    document.msExitFullscreen ? document.msExitFullscreen() : null;
  };

This code working in the following browsers: chrome, firefox, ie, opera
try it yourself enter full screen | exit full screen.

Just click the links it’s working nicelly (pure javascript), but push the F11 button and it will hit everything… the javascript control seemingly working but in the reality is not the same. It’s peter-out.

Chrome 35.0.1916.153
All the links functioning until F11 appears!

Opera 22.0
All the links functioning until F11 appears!

Internet Explorer 9
Absolutely nothing!

Internet Explorer 11
All the links functioning until F11 appears! But extra strange thing: the full screen mode is without scroll bars!

FireFox 30.0
Almost good.
1. try the links: enter full screen | exit full screen – it’s working
2. press F11 to go fullscreen mode again
   a. click the link exit full screen – nothing
   b. click the link enter full screen and after exit full screen – working!

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }