X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/f9ae81bddd61b9749df987e6c8ee9263ae464705..2a34127a122a0d415a1cabb8de8e80a91b3dc017:/src/components/SearchSectionReverse.svelte?ds=inline diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index a455a4e..2f53f39 100644 --- a/src/components/SearchSectionReverse.svelte +++ b/src/components/SearchSectionReverse.svelte @@ -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]); @@ -49,6 +49,7 @@ class="form-control form-control-sm d-inline" placeholder="latitude" pattern="^-?\d+(\.\d+)?$" + autofocus bind:value={lat} on:change={maybeSplitLatitude} />