Skip to content

Commit f87b322

Browse files
authored
Merge pull request #1824 from michaltarasiuk/bug/escape-key-blur-search-input
Unable to exit the search bar using the ESC key
2 parents eff02dd + 4906743 commit f87b322

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/web/ui/shared/search-box.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export const SearchBox = forwardRef(
5454
) {
5555
e.preventDefault();
5656
inputRef.current?.focus();
57+
} else if (e.key === "Escape") {
58+
inputRef.current?.blur();
5759
}
5860
}, []);
5961

0 commit comments

Comments
 (0)