fix(header-search): blur input when deactivating

This commit is contained in:
Eric Liu 2023-11-21 11:51:05 -08:00
commit 6f664b1c59

View file

@ -116,8 +116,9 @@
break; break;
case 'Escape': case 'Escape':
if (value === '') { if (value === '') {
// If the search bar is empty, close it. // If the search bar is empty, deactivate and blur the input.
active = false; active = false;
ref?.blur();
} }
// Reset the search query but keep the search bar active. // Reset the search query but keep the search bar active.