mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:37:11 -04:00 
			
		
		
		
	chore(web): ignore shortcut toggle when entering email and password (#12082)
This commit is contained in:
		
							parent
							
								
									16d5996f77
								
							
						
					
					
						commit
						aac6a4b052
					
				| @ -20,7 +20,7 @@ export const shouldIgnoreShortcut = (event: KeyboardEvent): boolean => { | |||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|   const type = (event.target as HTMLInputElement).type; |   const type = (event.target as HTMLInputElement).type; | ||||||
|   return ['textarea', 'text', 'date', 'datetime-local'].includes(type); |   return ['textarea', 'text', 'date', 'datetime-local', 'email', 'password'].includes(type); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| export const matchesShortcut = (event: KeyboardEvent, shortcut: Shortcut) => { | export const matchesShortcut = (event: KeyboardEvent, shortcut: Shortcut) => { | ||||||
| @ -53,7 +53,6 @@ export const shortcuts = <T extends HTMLElement>( | |||||||
| ): ActionReturn<ShortcutOptions<T>[]> => { | ): ActionReturn<ShortcutOptions<T>[]> => { | ||||||
|   function onKeydown(event: KeyboardEvent) { |   function onKeydown(event: KeyboardEvent) { | ||||||
|     const ignoreShortcut = shouldIgnoreShortcut(event); |     const ignoreShortcut = shouldIgnoreShortcut(event); | ||||||
| 
 |  | ||||||
|     for (const { shortcut, onShortcut, ignoreInputFields = true, preventDefault = true } of options) { |     for (const { shortcut, onShortcut, ignoreInputFields = true, preventDefault = true } of options) { | ||||||
|       if (ignoreInputFields && ignoreShortcut) { |       if (ignoreInputFields && ignoreShortcut) { | ||||||
|         continue; |         continue; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user