From: Tom Hughes Date: Sat, 27 Apr 2024 14:16:19 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4725' X-Git-Tag: live~579 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b3cb9e252413439cf8710860e5233af70df7224b?ds=sidebyside;hp=-c Merge remote-tracking branch 'upstream/pull/4725' --- b3cb9e252413439cf8710860e5233af70df7224b diff --combined app/assets/javascripts/index/search.js index b23dea69a,6590e83b4..d41fc7d53 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@@ -1,4 -1,3 +1,3 @@@ - //= require jquery-simulate/jquery.simulate //= require qs/dist/qs OSM.Search = function (map) { @@@ -44,17 -43,7 +43,7 @@@ .on("click", ".search_more a", clickSearchMore) .on("click", ".search_results_entry a.set_position", clickSearchResult) .on("mouseover", "li.search_results_entry:has(a.set_position)", showSearchResult) - .on("mouseout", "li.search_results_entry:has(a.set_position)", hideSearchResult) - .on("mousedown", "li.search_results_entry:has(a.set_position)", function () { - var moved = false; - $(this).one("click", function (e) { - if (!moved && !$(e.target).is("a")) { - $(this).find("a.set_position").simulate("click", e); - } - }).one("mousemove", function () { - moved = true; - }); - }); + .on("mouseout", "li.search_results_entry:has(a.set_position)", hideSearchResult); var markers = L.layerGroup().addTo(map); @@@ -94,6 -83,8 +83,6 @@@ } markers.addLayer(marker); - - $(this).closest("li").addClass("selected"); } function hideSearchResult() { @@@ -102,6 -93,8 +91,6 @@@ if (marker) { markers.removeLayer(marker); } - - $(this).closest("li").removeClass("selected"); } function panToSearchResult(data) {