title: Set Focus to input field
body: <p>I'm trying to set the focus to the searchbar of this <a href="https://github.com/smeijer/L.GeoSearch" rel="nofollow">Leaflet Plugin</a> input field, but it does not work. I've tried using the following:</p>
  
  <pre><code>//jquery  
  $("#leaflet-control-geosearch-qry").focus();  
  //html  
  document.getElementById("leaflet-control-geosearch-qry").focus();
  </code></pre>
  
  <p>You can try it out by yourself. The focus won't be set to set searchbar by using the above mentioned lines.</p>
  
  <p>Mapping one of these to a button and clicking on the button will set the focus to the searchbar. </p>
  
  <pre><code>&lt;script&gt;
      //Set Focus to Search Box
      function setFocusToSearchBar(){
          document.getElementById("leaflet-control-geosearch-qry").focus();
          //or $("#leaflet-control-geosearch-qry").focus();  
      }
  &lt;/script&gt;
  
  
  &lt;div id="Focus_on_Searchbar"&gt;
      &lt;button id="sidebar_button_focus" onclick="setFocusToSearchBar();"&gt;
          Focus on Searchbar
      &lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This works! 
  Using one of these with the Chrome/FF Console won't work and I have no idea why not because it works with a button.?</p>
  
  <p>Any ideas?
  I'm using Bootstrap for my Header-Bar...maybe this is important?</p>