fix(dialog): prevent dialogs from closing on overlay click

Add onInteractOutside handler to DialogContent to prevent accidental
dialog closure when users click on the overlay/backdrop. This prevents
data loss in forms and improves user experience across all 11 dialog
components in the application.

Users can still close dialogs using:
- Close button (X) in the top-right corner
- Cancel/Close buttons within the dialog
- ESC key
This commit is contained in:
Jason
2025-11-20 23:29:57 +08:00
parent 1f3627add3
commit 74969ae968

View File

@@ -59,6 +59,10 @@ const DialogContent = React.forwardRef<
zIndexMap[zIndex],
className,
)}
onInteractOutside={(e) => {
// 防止点击遮罩层关闭对话框
e.preventDefault();
}}
{...props}
>
{children}