mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:39:37 -05:00 
			
		
		
		
	fix(web): autofocus change name field (#9376)
This commit is contained in:
		
							parent
							
								
									fed8d11fb8
								
							
						
					
					
						commit
						fa4cd74dfd
					
				@ -62,7 +62,7 @@
 | 
				
			|||||||
  let handleSearchPeople: (force?: boolean, name?: string) => Promise<void>;
 | 
					  let handleSearchPeople: (force?: boolean, name?: string) => Promise<void>;
 | 
				
			||||||
  let showPeople: PersonResponseDto[] = [];
 | 
					  let showPeople: PersonResponseDto[] = [];
 | 
				
			||||||
  let countVisiblePeople: number;
 | 
					  let countVisiblePeople: number;
 | 
				
			||||||
 | 
					  let changeNameInputEl: HTMLInputElement | null;
 | 
				
			||||||
  let innerHeight: number;
 | 
					  let innerHeight: number;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (const person of people) {
 | 
					  for (const person of people) {
 | 
				
			||||||
@ -237,6 +237,8 @@
 | 
				
			|||||||
    personName = detail.name;
 | 
					    personName = detail.name;
 | 
				
			||||||
    personMerge1 = detail;
 | 
					    personMerge1 = detail;
 | 
				
			||||||
    edittingPerson = detail;
 | 
					    edittingPerson = detail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    setTimeout(() => changeNameInputEl?.focus(), 100);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const handleSetBirthDate = (detail: PersonResponseDto) => {
 | 
					  const handleSetBirthDate = (detail: PersonResponseDto) => {
 | 
				
			||||||
@ -448,7 +450,14 @@
 | 
				
			|||||||
      <form on:submit|preventDefault={submitNameChange} autocomplete="off" id="change-name-form">
 | 
					      <form on:submit|preventDefault={submitNameChange} autocomplete="off" id="change-name-form">
 | 
				
			||||||
        <div class="flex flex-col gap-2">
 | 
					        <div class="flex flex-col gap-2">
 | 
				
			||||||
          <label class="immich-form-label" for="name">Name</label>
 | 
					          <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>
 | 
					        </div>
 | 
				
			||||||
      </form>
 | 
					      </form>
 | 
				
			||||||
      <svelte:fragment slot="sticky-bottom">
 | 
					      <svelte:fragment slot="sticky-bottom">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user