title: focusout and click event execution order in Javascript
body: <p>I have defined a <code>focusout</code> event handler on a text box and a <code>click</code> handler on a button. If I focus inside the text input and then directly click the button, then both the events get fired, as expected. <code>focusout</code> event gets fired first and <code>click</code> is fired if developer toolbar is opened else its fires in vice-versa manner.</p>
  <p>What could be actual reason behind this?</p>
  <p>Here is the snippet for the ones asking, but I believe question itself was clear enough:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>document.getElementById('myInput').addEventListener('blur', function(){ alert("Input Focused Out"); });
          document.getElementById('myButton').addEventListener('click', function(){ alert("Button Clicked"); });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="myInput" name="myInput" type="text" /&gt;
  &lt;button id="myButton" name="myButton" &gt;Button&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>