Skip to content

Commit 25b55c4

Browse files
committed
Merge remote-tracking branch 'upstream/pull/6184'
2 parents 19eedd4 + 5e03d30 commit 25b55c4

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

app/assets/javascripts/index/directions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ OSM.Directions = function (map) {
5454

5555
$(".directions_form .btn-close").on("click", function (e) {
5656
e.preventDefault();
57-
$(".describe_location").toggle(!endpoints[1].value);
5857
$(".search_form input[name='query']").val(endpoints[1].value);
5958
OSM.router.route("/" + OSM.formatHash(map));
6059
});

app/assets/javascripts/index/search.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
OSM.Search = function (map) {
2-
$(".search_form input[name=query]").on("input", function (e) {
3-
if ($(e.target).val() === "") {
4-
$(".describe_location").fadeIn(100);
5-
} else {
6-
$(".describe_location").fadeOut(100);
7-
}
8-
});
9-
102
$(".search_form a.btn.switch_link").on("click", function (e) {
113
e.preventDefault();
124
const query = $(this).closest("form").find("input[name=query]").val();
@@ -112,10 +104,8 @@ OSM.Search = function (map) {
112104
const params = new URLSearchParams(path.substring(path.indexOf("?")));
113105
if (params.has("query")) {
114106
$(".search_form input[name=query]").val(params.get("query"));
115-
$(".describe_location").hide();
116107
} else if (params.has("lat") && params.has("lon")) {
117108
$(".search_form input[name=query]").val(params.get("lat") + ", " + params.get("lon"));
118-
$(".describe_location").hide();
119109
}
120110
OSM.loadSidebarContent(path, page.load);
121111
};
@@ -146,7 +136,6 @@ OSM.Search = function (map) {
146136
page.unload = function () {
147137
markers.clearLayers();
148138
$(".search_form input[name=query]").val("");
149-
$(".describe_location").fadeIn(100);
150139
};
151140

152141
return page;

app/assets/stylesheets/common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ header .search_forms,
557557
.describe_location {
558558
font-size: 10px;
559559
}
560+
561+
input:not(:placeholder-shown) + .input-group-text .describe_location {
562+
display: none;
563+
}
560564
}
561565

562566
/* Rules for routing */

0 commit comments

Comments
 (0)