Fix dropdown close overlay not working on Windows/Linux (#101)

This commit is contained in:
Huang Xin
2025-01-04 17:13:53 +01:00
committed by GitHub
parent 71d0735917
commit 2763c18d6f
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ const Dropdown: React.FC<DropdownProps> = ({
: children;
return (
<>
<div className='dropdown-container'>
{isOpen && (
<div className='fixed inset-0 bg-transparent' onClick={() => setIsDropdownOpen(false)} />
)}
@@ -48,7 +48,7 @@ const Dropdown: React.FC<DropdownProps> = ({
</div>
{isOpen && childrenWithToggle}
</div>
</>
</div>
);
};
@@ -53,6 +53,7 @@ const WindowButtons: React.FC<WindowButtonsProps> = ({
if (
target.closest('.btn') ||
target.closest('.window-button') ||
target.closest('.dropdown-container') ||
target.closest('.exclude-title-bar-mousedown')
) {
return;