X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a01195f1497b4f4c6b7d019c7affc794d41101cd..2b42fd102a55f7af41b8e19dfcb7271abb72ed1d:/app/assets/javascripts/index/search.js diff --git a/app/assets/javascripts/index/search.js b/app/assets/javascripts/index/search.js index ce00fa0af..c546469db 100644 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@ -6,11 +6,13 @@ function initializeSearch(map) { $("#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);