title: webkitRequestFullscreen works, but pops right back
body: <p>I'm trying to implement a button that will make the page go full screen.</p>
  
  <p>When clicking the button, the page goes full screen but only for a split second <strong>and then it pops right back</strong> to the way it was. There are no errors in the browser console (via Chrome).</p>
  
  <p>Here's my JS code:</p>
  
  <pre><code>function enterFullscreen() {
     var elem = document.getElementById('parent');
     if (elem.webkitRequestFullscreen) {
          elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
     }
     else {
          if (elem.mozRequestFullScreen) {
              elem.mozRequestFullScreen();
          }
          else {
              elem.requestFullscreen();
          }
     }
  }
  </code></pre>
  
  <p>Here's my HTML:</p>
  
  <pre><code>&lt;div id="parent"&gt;
      &lt;div id="child"&gt;
          &lt;button onclick="enterFullscreen()"&gt;Toggle fullscreen&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>