out side click fix
This commit is contained in:
@@ -61,8 +61,10 @@ const TaskDetailPopoverPanel: FC<Props> = ({ anchorRef, children, className, wid
|
||||
onClose();
|
||||
};
|
||||
|
||||
document.addEventListener("pointerdown", handlePointerDown);
|
||||
return () => document.removeEventListener("pointerdown", handlePointerDown);
|
||||
// Capture: DefaulModal stops pointerdown propagation on bubble, so outside-click
|
||||
// would never reach a document bubble listener while the modal is open.
|
||||
document.addEventListener("pointerdown", handlePointerDown, true);
|
||||
return () => document.removeEventListener("pointerdown", handlePointerDown, true);
|
||||
}, [anchorRef, onClose]);
|
||||
|
||||
if (!position) return null;
|
||||
|
||||
Reference in New Issue
Block a user