mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(header-search): blur input when deactivating (#1855)
This commit is contained in:
parent
d4e590fb07
commit
192f6a775c
1 changed files with 2 additions and 1 deletions
|
@ -116,8 +116,9 @@
|
|||
break;
|
||||
case 'Escape':
|
||||
if (value === '') {
|
||||
// If the search bar is empty, close it.
|
||||
// If the search bar is empty, deactivate and blur the input.
|
||||
active = false;
|
||||
ref?.blur();
|
||||
}
|
||||
|
||||
// Reset the search query but keep the search bar active.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue