title: IE focus event handler delay
body: <p>I have problem with focus event handling in the code below in IE8 I get the following output:</p>
  
  <pre><code>LOG: set focus txt1
  LOG: set focus txt2
  LOG: txt1 focus
  LOG: txt2 focus
  </code></pre>
  
  <p>but in all other browsers the output is:</p>
  
  <pre><code>LOG: set focus txt1
  LOG: txt1 focus
  LOG: set focus txt2
  LOG: txt2 focus
  </code></pre>
  
  <p>it seems that IE8 queues all focus requests and executes event handlers after current function ends.</p>
  
  <p>Is there any workaround to force IE8 to behave nicely like other browsers?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script&gt;
          function test(){
              console.log('set focus txt1');
              document.getElementById('txt1').focus();
              console.log('set focus txt2');
              document.getElementById('txt2').focus();
          }
      &lt;/script&gt;
  &lt;input id="txt1" type="text" onfocus="javascript:console.log('txt1 focus')" style="width:100px" /&gt;
  &lt;input id="txt2" type="text" onfocus="javascript:console.log('txt2 focus')" style="width:100px" /&gt;
  &lt;button value="Click" onclick="javascript:test()"&gt;&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>