fix(mail): 阻止撰写弹窗外部交互关闭

- 为 `DialogContent` 增加外部交互拦截,避免点击或按下弹窗外区域时被意外关闭。
This commit is contained in:
LanQin_
2026-06-17 15:10:07 +08:00
parent bfc114bec3
commit 25f5933792
+5 -1
View File
@@ -1664,7 +1664,11 @@ function ComposeDialog({ mailbox, open, draft, onOpenChange, onSent }: { mailbox
}
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="w-[min(96vw,82rem)] max-w-none overflow-hidden p-0">
<DialogContent
className="w-[min(96vw,82rem)] max-w-none overflow-hidden p-0"
onInteractOutside={(event) => event.preventDefault()}
onPointerDownOutside={(event) => event.preventDefault()}
>
<form key={draft?.key || "new"} className="flex max-h-[90vh] flex-col" onSubmit={submit}>
<DialogHeader className="border-b px-6 py-4 text-left">
<DialogTitle className="flex items-center justify-between gap-4">