mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 02:27:08 -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; | ||||
|   } | ||||
|   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) => { | ||||
| @ -53,7 +53,6 @@ export const shortcuts = <T extends HTMLElement>( | ||||
| ): ActionReturn<ShortcutOptions<T>[]> => { | ||||
|   function onKeydown(event: KeyboardEvent) { | ||||
|     const ignoreShortcut = shouldIgnoreShortcut(event); | ||||
| 
 | ||||
|     for (const { shortcut, onShortcut, ignoreInputFields = true, preventDefault = true } of options) { | ||||
|       if (ignoreInputFields && ignoreShortcut) { | ||||
|         continue; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user