fix(mail): 阻止撰写弹窗外部交互关闭
- 为 `DialogContent` 增加外部交互拦截,避免点击或按下弹窗外区域时被意外关闭。
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user