X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/9f280ac8ee3878fa1774be452a879e6d37b67510..ff85679c2bc5fcc4119ab4da563fa5222440f3ab:/src/pages/SearchPage.svelte diff --git a/src/pages/SearchPage.svelte b/src/pages/SearchPage.svelte index 6f10f74..134ea8a 100644 --- a/src/pages/SearchPage.svelte +++ b/src/pages/SearchPage.svelte @@ -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);