]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
autofocus on search fields
authormarc tobias <mtmail@gmx.net>
Sun, 11 Dec 2022 02:35:40 +0000 (03:35 +0100)
committermtmail <mtmail@gmx.net>
Sun, 11 Dec 2022 13:02:08 +0000 (14:02 +0100)
src/components/SearchSection.svelte
src/components/SearchSectionDetails.svelte
src/components/SearchSectionReverse.svelte

index e7520ad487558e9c559dd288eca6115122ce71b0..e50bbdfff59247ef12591f2190efcdbe5601f983 100644 (file)
@@ -95,7 +95,8 @@
                type="text"
                class="form-control form-control-sm"
                placeholder="Search"
-               value="{api_request_params.q || ''}" />
+               value="{api_request_params.q || ''}"
+               autofocus />
       </div>
       <div class="col-auto">
         <button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>
index a779b4fa60e0424606aabfb2497823f751ecc402..c30f057ead9e89f8e84d85d6a5248c6a9c020050 100644 (file)
@@ -30,7 +30,8 @@
       <input type="edit"
              class="form-control form-control-sm me-1"
              pattern="^[NWRnwr]?[0-9]+$|.*openstreetmap.*"
-             value="{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}" />
+             value="{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}"
+             autofocus />
       </div>
     <div class="col-auto">
       <button type="submit" class="btn btn-primary btn-sm">Show</button>
index a455a4ea82d76b2cc6461bde146bcc6028bfea6b..e8f1a47bb90534b6b4b9e8c9a8db323665af1509 100644 (file)
@@ -49,6 +49,7 @@
            class="form-control form-control-sm d-inline"
            placeholder="latitude"
            pattern="^-?\d+(\.\d+)?$"
+           autofocus
            bind:value={lat}
            on:change={maybeSplitLatitude} />
   </div>