fix(forms): remove autofocus from WhoWhenSection entirely

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 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-24 19:51:15 +02:00
parent 9d687ba9f9
commit dd6331c098
2 changed files with 1 additions and 6 deletions

View File

@@ -220,7 +220,6 @@ async function save() {
bind:selectedReceivers={selectedReceivers}
bind:dateIso={dateIso}
initialSenderName={initialSenderName}
autofocus={false}
/>
<DescriptionSection bind:tags={tags} hideTitle />
</ScopeCard>

View File

@@ -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}
/>
</div>