mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-06 13:48:58 +02:00
add null check dropdown
This commit is contained in:
parent
64d8ef4a39
commit
4149804183
@ -123,7 +123,7 @@ if (searchDropdown && searchInput) {
|
||||
|
||||
// Hide dropdown if it's open and user clicks outside
|
||||
document.addEventListener('click', function (e) {
|
||||
if (!searchDropdown.contains(e.target) && dropdownMenu.classList.contains('show')) {
|
||||
if (dropdownMenu && !searchDropdown.contains(e.target) && dropdownMenu.classList.contains('show')) {
|
||||
dropdownInstance.hide();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user