From 6f664b1c5982cceaa26acffbfdb83c1aebb577a5 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 21 Nov 2023 11:51:05 -0800 Subject: [PATCH] fix(header-search): blur input when deactivating --- src/UIShell/HeaderSearch.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UIShell/HeaderSearch.svelte b/src/UIShell/HeaderSearch.svelte index 4c438269..105fc0fc 100644 --- a/src/UIShell/HeaderSearch.svelte +++ b/src/UIShell/HeaderSearch.svelte @@ -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.