title: Trying to set focus programmatically does not work with Firefox
body: <p>I have a problem <strong>in Firefox</strong> trying to set the focus to a control using <s>jquery</s>javascript. While my specific problem is quite involved, even the simple test case below does not work for me. The input is found, its value is changed but the input is not focused.<br>
  Issue present with Firefox only</p>
  
  <p>Tried with Firefox 44.0.2 on Windows 7<br>
  It works as it should with MS IE 10 and Chrome</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$().ready(function() {
    $("#I").val(3);
    $("#I").focus(); // JQuery focus - does not work
    
    var ctl = document.getElementById('I')
    ctl.value='DOM';
    ctl.focus(); // DOM Native focus - does not work
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type=text id=I&gt;</code></pre>
  </div>
  </div>
  </p>