title: document.activeElement is null in Internet Explorer
body: <p>I have an eventlistener for onmousedown. The functions removes elements from DOM. If I click into an inputfield the currently focused element is removed from DOM.
  --> document.activeElement becomes null in Internet Explorer and inputfield is not focused</p>
  
  <p>It can be reproduced with this snippet. Focus the A-tag with "Tab" and click into inputfield afterwards.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;TEST&lt;/title&gt;
  &lt;/head&gt;
  &lt;body onmousedown="test(event);"&gt;
    &lt;a href="#"&gt;Test&lt;/a&gt;
    &lt;input type="text"/&gt;
    &lt;script&gt;
      function test(evt) {
        var elem = document.body.querySelector("A");
        elem.parentNode.removeChild(elem);
      }
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any ideas why this happens and how I can avoid it?</p>