From 135d69e598b7cd2b53bbc97479d21f052f0d965f Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Tue, 24 Mar 2026 06:25:50 -0400 Subject: [PATCH] Prevent suggestions from closing when selecting an item from the list --- scripts/ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ui.js b/scripts/ui.js index af6be01..23cc3a3 100644 --- a/scripts/ui.js +++ b/scripts/ui.js @@ -671,7 +671,10 @@ // Hide suggestions when focus leaves the input input.addEventListener('blur', () => { - suggestionsDiv.style.display = 'none'; + // If the user isn't targeting the suggestions div, hide them + if (!document.activeElement.closest(suggestionsDiv)) { + suggestionsDiv.style.display = 'none'; + } }); // Setup chevron button (triggers dropdown like down arrow)