Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: press escape to exit search

Abdullah Atta8e07ae8b2642
diff --git a/apps/web/src/components/route-container/index.tsx b/apps/web/src/components/route-container/index.tsx
index 36dea70cb..fabf5a574 100644
--- a/apps/web/src/components/route-container/index.tsx
+++ b/apps/web/src/components/route-container/index.tsx
@@ -87,6 +87,13 @@ function Header(props: RouteContainerProps) {
(e) => useSearchStore.setState({ query: e.target.value }),
250
)}
+ onKeyUp={(e) => {
+ if (e.key === "Escape")
+ useSearchStore.setState({
+ isSearching: false,
+ searchType: undefined
+ });
+ }}
action={{
icon: Close,
testId: "search-button",