fix(header-search): "Escape" should clear search query (#1851)

This commit is contained in:
metonym 2023-11-20 13:37:34 -08:00 committed by GitHub
commit 6da4572c26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,6 +114,12 @@
selectedResultIndex -= 1; selectedResultIndex -= 1;
} }
break; break;
case 'Escape':
// Reset the search query but keep the search bar active.
// Do not dispatch "clear" event as that should fire only on the "x" button.
value = '';
selectedResultIndex = 0;
break;
} }
}}" }}"
on:paste on:paste