]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/SearchSectionReverse.svelte
Merge remote-tracking branch 'upstream/master'
[nominatim-ui.git] / src / components / SearchSectionReverse.svelte
index e8f1a47bb90534b6b4b9e8c9a8db323665af1509..46bb2b9d11a850b6f99fa6e01d7723b76d9f3eff 100644 (file)
@@ -29,7 +29,7 @@
 
   // common mistake is to copy&paste latitude and longitude into the 'lat' search box
   function maybeSplitLatitude(e) {
-    var coords_split = e.target.value.split(',');
+    var coords_split = e.target.value.split(/,|%2C/);
     if (coords_split.length === 2) {
       document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]);
       document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]);
            class="form-control form-control-sm d-inline"
            placeholder="latitude"
            pattern="^-?\d+(\.\d+)?$"
-           autofocus
            bind:value={lat}
            on:change={maybeSplitLatitude} />
   </div>
   <div class="col-auto">
-    <a id="switch-coords"
+    <button id="switch-coords"
        on:click|preventDefault|stopPropagation={() => gotoCoordinates(lon, lat)}
        class="btn btn-outline-secondary btn-sm"
-       title="switch lat and lon">&lt;&gt;</a>
+       title="switch lat and lon">&lt;&gt;</button>
   </div>
   <div class="col-auto">
     <label for="reverse-lon">lon</label>