fix multiple searches on enter press
This commit is contained in:
parent
f10c27c125
commit
7d5d2bf30b
1 changed files with 2 additions and 11 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue