From: Anton Khorev Date: Sat, 27 Apr 2024 02:08:31 +0000 (+0300) Subject: Remove simulating clicks on when
  • is clicked X-Git-Tag: live~579^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ec91b3a39fc28442f367be1dda6cb9dc37172cbb?ds=sidebyside;hp=-c Remove simulating clicks on when
  • is clicked The simulation is not required because the link is stretched. --- ec91b3a39fc28442f367be1dda6cb9dc37172cbb diff --git a/app/assets/javascripts/index/search.js b/app/assets/javascripts/index/search.js index 1c1da3677..6590e83b4 100644 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@ -1,4 +1,3 @@ -//= require jquery-simulate/jquery.simulate //= require qs/dist/qs OSM.Search = function (map) { @@ -44,17 +43,7 @@ OSM.Search = function (map) { .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);