title: jQuery focus() and focusout() conflict in IE
body: <p>Not sure how to solve this. </p>
  
  <p>I'm using <code>jQuery.focus()</code> and <code>jQuery.focusout()</code> to trigger an Ajax request and rename a post in WordPress. This code works ok in Chrome and Firefox but i can't get it to work on IE. </p>
  
  <p>snippet:</p>
  
  <pre><code>$('.editname').on('click', function() {
  
      var input = $('&lt;input id="editcat" type="text" name="editcat" value="' + name + '" /&gt;');
      input.appendTo($(this));
      $("#editcat").focus();
  });
  
  $(".editname").focusout(function() {
  
      $(this).children('input').detach();
      $(this).children('span').show();
  
  
  });
  </code></pre>
  
  <p><strong>working example:</strong> <a href="http://jsfiddle.net/moraleida/fE5Tq/3/" rel="nofollow">http://jsfiddle.net/moraleida/fE5Tq/3/</a></p>
  
  <p>Seems that focusout() event is called right after the <code>appendTo</code> in IE, before the browser has time to <code>focus()</code> on the appended input. </p>
  
  <p>Is there a known workaround for this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Changing <code>focusout</code> to <code>blur</code> doesn't work. Apparently, the problem is that calling <code>$("#editcat").focus();</code> makes <code>.editname</code> loose focus/blur. If I comment that line, the input appears ok, but when I click to focus on it, it gets detached.</p>