title: Fullscreen and clickable area (Internet browser)
body: <p>I've made a game that is displayed by a  tag. It can be displayed fullscreen on an Internet browser when you click on a button, but...</p>
  
  <p>When I go fullscreen, the clickable area only matches the initial size of the canvas, which means that the you can only interact with the game through a small square on the top left screen.</p>
  
  <p>I've figured that, somehow, if I press F11, then F10, it works perfectly. But if I press F10 without setting my browser to fullscreen mode first, the "fullscreen" of the canvas is actually a small square appearing on the top left of the screen, over a black background, not even resized...</p>
  
  <p>Unfortunatly, what I call a "game" is intended to an audience that is not familiar at all with the Internet. So this would be really inconvenient to ask people to press "F11", then "F10" to set the... well, it's annoying.</p>
  
  <p>So, here's my question: is there a way to "emulate" that "f11, f10 combo"?</p>
  
  <p>My actual code is:</p>
  
  <pre><code>&lt;script&gt;
  function goFullScreen(){
  var elem = document.getElementById("canvas");
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.mozRequestFullScreen) {
    elem.mozRequestFullScreen();
  } else if (elem.webkitRequestFullscreen) {
    elem.webkitRequestFullscreen();
  }
  }
          &lt;/script&gt;
  
          &lt;p&gt;&lt;button onclick="goFullScreen();"&gt;Go fullscreen&lt;/button&gt;&lt;/p&gt;
  </code></pre>
  
  <p>For some reason, this, above, is not equal to "F11, then F10..." How ?!</p>
  
  <p>Thanks for reading.</p>
  
  <p>Edit (additional informations):</p>
  
  <ul>
  <li>I tried it on edge and mozilla firefox (The behaviour is nearly the same)</li>
  <li>I'm not using devtools.</li>
  <li><p>The size of my canvas is set basically, as follow:</p>
  
  
              
              
          
  
  <p></p></li>
  <li><p>This above is not linked to any relevant or tricky .css content.</p></li>
  <li><p>For the html part, the code I pasted is nearly the whole content of the page.</p></li>
  <li><p>Finally, concerning the click events, I don't know what to say, this is pretty basics: a button, an onclick event linked to the function pasted above. Concerning the game by itself, it shouldn't interfere since it doesn't if I set the browser in fullscreen (with "F11" key), then the content of the page in fullscreen (with the "F10" key). Any other way doesn't work properly.</p></li>
  </ul>