fix: Fix unresponsive status banner button (#35051)
This commit is contained in:
		
					parent
					
						
							
								0544898b8b
							
						
					
				
			
			
				commit
				
					
						4d29215ad3
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -18,8 +18,13 @@ export const StatusBanner: React.FC<{ | |||
| 
 | ||||
|   const buttonRef = useRef<HTMLButtonElement>(null); | ||||
|   const forwardClick = useCallback<MouseEventHandler>((e) => { | ||||
|     if (buttonRef.current && e.target !== buttonRef.current) { | ||||
|     if ( | ||||
|       buttonRef.current && | ||||
|       e.target !== buttonRef.current && | ||||
|       !buttonRef.current.contains(e.target as Node) | ||||
|     ) { | ||||
|       buttonRef.current.click(); | ||||
|       buttonRef.current.focus(); | ||||
|     } | ||||
|   }, []); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue