Fix issue when closing context menus or modals on the search page causing the search page to break (closes #73)

This commit is contained in:
HighImKevin
2026-01-07 15:04:30 -05:00
parent 08a473ca26
commit 16bb1f989a
+4 -3
View File
@@ -201,7 +201,7 @@
// Hide search suggestions
const searchSuggestions = searchPage.querySelector('.searchSuggestions');
if (searchSuggestions) {
searchSuggestions.remove();
searchSuggestions.style.display = 'none';
}
const noItemsMessage = searchPage.querySelector('.noItemsMessage.dummy-section');
@@ -491,9 +491,10 @@
wrapper.appendChild(btnRow);
wrapper.appendChild(stats);
// Replace the original input with our wrapper
// Insert the wrapper before the original input
originalInput.parentElement.insertBefore(wrapper, originalInput);
originalInput.remove(); // Remove the original input
// Hide the original input
originalInput.style.display = 'none';
input.focus();
}