From 2f8b33afce5cd34432db91fbd4d6950bd38359a3 Mon Sep 17 00:00:00 2001 From: marc tobias Date: Sun, 11 Dec 2022 03:35:40 +0100 Subject: [PATCH] autofocus on search fields --- src/components/SearchSection.svelte | 3 ++- src/components/SearchSectionDetails.svelte | 3 ++- src/components/SearchSectionReverse.svelte | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/SearchSection.svelte b/src/components/SearchSection.svelte index e7520ad..e50bbdf 100644 --- a/src/components/SearchSection.svelte +++ b/src/components/SearchSection.svelte @@ -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 />
diff --git a/src/components/SearchSectionDetails.svelte b/src/components/SearchSectionDetails.svelte index a779b4f..c30f057 100644 --- a/src/components/SearchSectionDetails.svelte +++ b/src/components/SearchSectionDetails.svelte @@ -30,7 +30,8 @@ + value="{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}" + autofocus />
diff --git a/src/components/SearchSectionReverse.svelte b/src/components/SearchSectionReverse.svelte index a455a4e..e8f1a47 100644 --- a/src/components/SearchSectionReverse.svelte +++ b/src/components/SearchSectionReverse.svelte @@ -49,6 +49,7 @@ class="form-control form-control-sm d-inline" placeholder="latitude" pattern="^-?\d+(\.\d+)?$" + autofocus bind:value={lat} on:change={maybeSplitLatitude} />
-- 2.39.5