mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:29:32 -05:00 
			
		
		
		
	fix(web): focus escaping from modals (#8730)
* fix(web): focus escaping modals * fix: exclusion pattern modal should initially load with the "Add" button disabled * fix: simplify conditional statement
This commit is contained in:
		
							parent
							
								
									9c696e4c28
								
							
						
					
					
						commit
						25e1887939
					
				@ -17,7 +17,7 @@
 | 
				
			|||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $: isDuplicate = exclusionPattern !== null && exclusionPatterns.includes(exclusionPattern);
 | 
					  $: isDuplicate = exclusionPattern !== null && exclusionPatterns.includes(exclusionPattern);
 | 
				
			||||||
  $: canSubmit = exclusionPattern !== '' && exclusionPattern !== null && !exclusionPatterns.includes(exclusionPattern);
 | 
					  $: canSubmit = exclusionPattern && !exclusionPatterns.includes(exclusionPattern);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const dispatch = createEventDispatcher<{
 | 
					  const dispatch = createEventDispatcher<{
 | 
				
			||||||
    cancel: void;
 | 
					    cancel: void;
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  const getFocusableElements = () => {
 | 
					  const getFocusableElements = () => {
 | 
				
			||||||
    return Array.from(
 | 
					    return Array.from(
 | 
				
			||||||
      container.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),
 | 
					      container.querySelectorAll(
 | 
				
			||||||
 | 
					        'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
 | 
				
			||||||
 | 
					      ),
 | 
				
			||||||
    ) as HTMLElement[];
 | 
					    ) as HTMLElement[];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user