1
0
mirror of https://github.com/immich-app/immich.git synced 2025-03-05 16:07:54 +02:00

fix(web): autofocus change name field (#9376)

This commit is contained in:
Alex 2024-05-10 12:18:10 -05:00 committed by GitHub
parent fed8d11fb8
commit fa4cd74dfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,7 +62,7 @@
let handleSearchPeople: (force?: boolean, name?: string) => Promise<void>;
let showPeople: PersonResponseDto[] = [];
let countVisiblePeople: number;
let changeNameInputEl: HTMLInputElement | null;
let innerHeight: number;
for (const person of people) {
@ -237,6 +237,8 @@
personName = detail.name;
personMerge1 = detail;
edittingPerson = detail;
setTimeout(() => changeNameInputEl?.focus(), 100);
};
const handleSetBirthDate = (detail: PersonResponseDto) => {
@ -448,7 +450,14 @@
<form on:submit|preventDefault={submitNameChange} autocomplete="off" id="change-name-form">
<div class="flex flex-col gap-2">
<label class="immich-form-label" for="name">Name</label>
<input class="immich-form-input" id="name" name="name" type="text" bind:value={personName} />
<input
class="immich-form-input"
id="name"
name="name"
type="text"
bind:value={personName}
bind:this={changeNameInputEl}
/>
</div>
</form>
<svelte:fragment slot="sticky-bottom">