X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/9f280ac8ee3878fa1774be452a879e6d37b67510..2ad2d560644dbaaf76d4bad21a59e87ce3eb842a:/src/pages/SearchPage.svelte?ds=sidebyside diff --git a/src/pages/SearchPage.svelte b/src/pages/SearchPage.svelte index 6f10f74..e80729f 100644 --- a/src/pages/SearchPage.svelte +++ b/src/pages/SearchPage.svelte @@ -25,7 +25,7 @@ polygon_geojson: Nominatim_Config.Search_AreaPolygons ? 1 : 0, viewbox: search_params.get('viewbox'), bounded: search_params.get('bounded'), - dedupe: search_params.get('dedupe'), + dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0, 'accept-language': search_params.get('accept-language'), countrycodes: search_params.get('countrycodes'), limit: search_params.get('limit'), @@ -47,7 +47,12 @@ update_html_title('Result for ' + api_request_params.q); - document.querySelector('input[name=q]').focus(); + if (anyStructuredFieldsSet) { + document.querySelector(".nav-tabs a[href='#structured']").click(); + document.querySelector('input[name=street]').focus(); + } else { + document.querySelector('input[name=q]').focus(); + } }); } else { results_store.set(undefined);