From 7d5d2bf30b644d28c91a9e8c13cfeb465fdf8e59 Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Sat, 13 Sep 2025 20:05:01 -0700 Subject: [PATCH] fix multiple searches on enter press --- webui/static/script.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/webui/static/script.js b/webui/static/script.js index 78e4d8fd..bd4d8290 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -4764,19 +4764,10 @@ let isDownloadPollingActive = false; async function loadDownloadsData() { // Downloads page loads search results dynamically console.log('Downloads page loaded'); - - // Connect downloads search button - const searchButton = document.getElementById('downloads-search-btn'); - const searchInput = document.getElementById('downloads-search-input'); + + // Event listeners are already set up in initializeSearch() - don't duplicate them const clearButton = document.querySelector('.controls-panel__clear-btn'); - if (searchButton && searchInput) { - searchButton.addEventListener('click', performDownloadsSearch); - searchInput.addEventListener('keypress', (e) => { - if (e.key === 'Enter') performDownloadsSearch(); - }); - } - if (clearButton) { clearButton.addEventListener('click', clearFinishedDownloads); }