$("#search_form").submit();
}
- // Focus the search field for browsers that don't support
- // the HTML5 'autofocus' attribute
- if (!("autofocus" in document.createElement("input"))) {
- $("#query").focus();
- }
+ $("#query")
+ .on("focus", function() {
+ $("#describe_location").fadeOut(100);
+ })
+ .on("blur", function() {
+ $("#describe_location").fadeIn(100);
+ });
$("#sidebar_content").on("click", ".search_results_entry a.set_position", clickSearchResult);
<%= submit_tag t('site.search.submit_text') %>
<div id='query_wrapper'>
<%= text_field_tag :query, params[:query],
- :placeholder => t('site.search.search'),
- :autofocus => "autofocus" %>
+ :placeholder => t('site.search.search') %>
<%= link_to t('site.search.where_am_i'),
{ :controller => :geocoder, :action => :description },
{ :id => "describe_location", :title => t('site.search.where_am_i_title') } %>