mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-15 17:50:48 +02: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' }, () => {
|
useKeyboardShortcut({ key: 'Escape' }, () => {
|
||||||
setShowSuggestions(false);
|
setShowSuggestions(false);
|
||||||
|
if (searchContainerRef.current?.contains(document.activeElement)) {
|
||||||
|
searchInputRef.current?.blur();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
const placeholder = `Command bar (${hotkey})`;
|
const placeholder = `Command bar (${hotkey})`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user