X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/6e68f11776a8f6f5a62b989f13ebf7438ef32476..7f90f6a3290a255df73cce8e5317155071fc6641:/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);
