We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7da933d commit 97a29adCopy full SHA for 97a29ad
1 file changed
apps/webapp/app/components/primitives/SearchInput.tsx
@@ -80,9 +80,12 @@ export function SearchInput({
80
handleSubmit();
81
}
82
if (e.key === "Escape") {
83
- e.stopPropagation();
84
- handleClear();
85
- e.currentTarget.blur();
+ if (text.length > 0) {
+ e.stopPropagation();
+ handleClear();
86
+ } else {
87
+ e.currentTarget.blur();
88
+ }
89
90
}}
91
onFocus={() => setIsFocused(true)}
0 commit comments