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:
@@ -220,7 +220,6 @@ async function save() {
|
|||||||
bind:selectedReceivers={selectedReceivers}
|
bind:selectedReceivers={selectedReceivers}
|
||||||
bind:dateIso={dateIso}
|
bind:dateIso={dateIso}
|
||||||
initialSenderName={initialSenderName}
|
initialSenderName={initialSenderName}
|
||||||
autofocus={false}
|
|
||||||
/>
|
/>
|
||||||
<DescriptionSection bind:tags={tags} hideTitle />
|
<DescriptionSection bind:tags={tags} hideTitle />
|
||||||
</ScopeCard>
|
</ScopeCard>
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ let {
|
|||||||
initialLocation = '',
|
initialLocation = '',
|
||||||
initialSenderName = '',
|
initialSenderName = '',
|
||||||
suggestedDateIso = '',
|
suggestedDateIso = '',
|
||||||
suggestedSenderName = '',
|
suggestedSenderName = ''
|
||||||
autofocus = true
|
|
||||||
}: {
|
}: {
|
||||||
senderId?: string;
|
senderId?: string;
|
||||||
selectedReceivers?: Person[];
|
selectedReceivers?: Person[];
|
||||||
@@ -27,7 +26,6 @@ let {
|
|||||||
initialSenderName?: string;
|
initialSenderName?: string;
|
||||||
suggestedDateIso?: string;
|
suggestedDateIso?: string;
|
||||||
suggestedSenderName?: string;
|
suggestedSenderName?: string;
|
||||||
autofocus?: boolean;
|
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
let dateDisplay = $state(untrack(() => isoToGerman(initialDateIso)));
|
let dateDisplay = $state(untrack(() => isoToGerman(initialDateIso)));
|
||||||
@@ -71,7 +69,6 @@ $effect(() => {
|
|||||||
oninput={handleDateInput}
|
oninput={handleDateInput}
|
||||||
placeholder={m.form_placeholder_date()}
|
placeholder={m.form_placeholder_date()}
|
||||||
maxlength="10"
|
maxlength="10"
|
||||||
autofocus={autofocus && !initialDateIso}
|
|
||||||
class="block w-full rounded border border-line px-2 py-3 text-sm shadow-sm
|
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'}"
|
{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}
|
aria-describedby={dateInvalid ? 'date-error' : undefined}
|
||||||
@@ -91,7 +88,6 @@ $effect(() => {
|
|||||||
bind:value={senderId}
|
bind:value={senderId}
|
||||||
initialName={initialSenderName}
|
initialName={initialSenderName}
|
||||||
suggestedName={suggestedSenderName}
|
suggestedName={suggestedSenderName}
|
||||||
autofocus={autofocus && !!initialDateIso}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user