title: Certain alerts from Javascript are automatically closing?
body: <p>I was going to implement response to keys, so I started off with:</p>
  
  <pre><code>window.addEventListener('keydown', function(e) {
      alert(e.keyCode)
  }, true)
  </code></pre>
  
  <p>It works with most keys. When I press a key it alerts the key code. (Of course, this is not the final design; just a test to see if it would work to make debugging easier.)</p>
  
  <p>However, I found some interesting behavior. It does odd things when I use the space key.</p>
  
  <p>When I press the space key, the alert with the number '32' (keycode of space) appears. However, when I release the key, the alert automatically closes!</p>
  
  <p>I have found that with the <code>Enter</code> key, I have to press it again to close the alert. Not with space though.</p>
  
  <p>Why is this?</p>