mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: remove focus on ESC (#7535)
Now when pressing ESC, command bar will lose focus. ![image](https://github.com/Unleash/unleash/assets/964450/9aea3b2b-bf06-4910-96be-0a67472945af)
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