Skip to content

Commit 8243ae2

Browse files
committed
fix: prevent search modal from opening when clear button is clicked
1 parent ebde06e commit 8243ae2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

framework/core/js/src/common/components/AbstractGlobalSearch.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export default abstract class AbstractGlobalSearch<T extends SearchAttrs = Searc
100100
role="search"
101101
className="Search"
102102
aria-label={this.attrs.a11yRoleLabel}
103-
onclick={() => {
103+
onclick={(e: MouseEvent) => {
104+
if ((e.target as HTMLElement).closest('.Input-clear')) return;
105+
104106
this.$('input').blur();
105107
setTimeout(() => openSearchModal(), 150);
106108
}}

0 commit comments

Comments
 (0)