mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Prevent suggestions from closing when selecting an item from the list
This commit is contained in:
+4
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user