title: autofocus attribute not working in Firefox on display state change
body: <p>I'm trying to add auto focus to a form. I have it working in Chrome but cannot get it working in Firefox with the below code. I think the reason could potentially be that it needs to be just <code>autofocus</code> rather than <code>autofocus="autofocus"</code>. Would I be correct in assuming this? If so is there some way I can add it? I'm using a framework called SilverStripe and don't have direct access to editing the input field as it's done dynamically so would need to do it via JavaScript most likely.</p>
  
  <pre><code>&lt;input type="text" name="Search" class="form-control search-form" id="TemplateSearchForm_SearchForm_Search" placeholder="Search..." autofocus="autofocus"&gt;
  </code></pre>
  
  <p>Note I am initially hiding the input box and displaying on the click of an icon by adding a class:</p>
  
  <pre><code>jQuery('.search').click(function () {
      if(jQuery('.search-btn').hasClass('fa-search')){
          jQuery('.search-open').fadeIn(500);
      } else {
          jQuery('.search-open').fadeOut(500);
      }
  });
  </code></pre>