mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: remove focus on ESC (#7535)
Now when pressing ESC, command bar will lose focus. 
This commit is contained in:
		
							parent
							
								
									bf2df49bd6
								
							
						
					
					
						commit
						8dd77f3bbd
					
				@ -195,6 +195,9 @@ export const CommandBar = () => {
 | 
			
		||||
    );
 | 
			
		||||
    useKeyboardShortcut({ key: 'Escape' }, () => {
 | 
			
		||||
        setShowSuggestions(false);
 | 
			
		||||
        if (searchContainerRef.current?.contains(document.activeElement)) {
 | 
			
		||||
            searchInputRef.current?.blur();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
    const placeholder = `Command bar (${hotkey})`;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user