From ca62f5092165d10ee47b301cb6ed521bca027f8e Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 24 Apr 2026 19:51:15 +0200 Subject: [PATCH] fix(forms): remove autofocus from WhoWhenSection entirely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The autofocus prop was added conditionally but still triggered on the bulk-upload page. Removing it completely — callers that need focus management can handle it independently. Co-Authored-By: Claude Sonnet 4.6 --- .../lib/components/document/BulkDocumentEditLayout.svelte | 1 - frontend/src/lib/components/document/WhoWhenSection.svelte | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/lib/components/document/BulkDocumentEditLayout.svelte b/frontend/src/lib/components/document/BulkDocumentEditLayout.svelte index 0cf98694..c1ece8b1 100644 --- a/frontend/src/lib/components/document/BulkDocumentEditLayout.svelte +++ b/frontend/src/lib/components/document/BulkDocumentEditLayout.svelte @@ -220,7 +220,6 @@ async function save() { bind:selectedReceivers={selectedReceivers} bind:dateIso={dateIso} initialSenderName={initialSenderName} - autofocus={false} /> diff --git a/frontend/src/lib/components/document/WhoWhenSection.svelte b/frontend/src/lib/components/document/WhoWhenSection.svelte index c8d03e24..679ecc84 100644 --- a/frontend/src/lib/components/document/WhoWhenSection.svelte +++ b/frontend/src/lib/components/document/WhoWhenSection.svelte @@ -16,8 +16,7 @@ let { initialLocation = '', initialSenderName = '', suggestedDateIso = '', - suggestedSenderName = '', - autofocus = true + suggestedSenderName = '' }: { senderId?: string; selectedReceivers?: Person[]; @@ -27,7 +26,6 @@ let { initialSenderName?: string; suggestedDateIso?: string; suggestedSenderName?: string; - autofocus?: boolean; } = $props(); let dateDisplay = $state(untrack(() => isoToGerman(initialDateIso))); @@ -71,7 +69,6 @@ $effect(() => { oninput={handleDateInput} placeholder={m.form_placeholder_date()} maxlength="10" - autofocus={autofocus && !initialDateIso} class="block w-full rounded border border-line px-2 py-3 text-sm shadow-sm {dateInvalid ? 'border-red-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-500' : 'focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring'}" aria-describedby={dateInvalid ? 'date-error' : undefined} @@ -91,7 +88,6 @@ $effect(() => { bind:value={senderId} initialName={initialSenderName} suggestedName={suggestedSenderName} - autofocus={autofocus && !!initialDateIso} />