Handling of right-click outside the menu to close the menu

This commit is contained in:
Shidorien
2026-01-30 20:38:02 +01:00
parent 1591e32b4f
commit 756cccf85c
+2 -2
View File
@@ -12,9 +12,9 @@ export function useClickOutside(ref: MutableRefObject<any>, handler: ComponentPr
}
};
document.addEventListener("click", handleClickOutside);
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener("click", handleClickOutside);
document.removeEventListener("mousedown", handleClickOutside);
};
}, [ref]);
}