From 2d4a75a21a8a97db8017b56e321c56c7d70bc674 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sat, 29 Jul 2023 01:22:38 +0800
Subject: ...

---
 FrontEnd/src/views/common/dialog/Dialog.tsx | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

(limited to 'FrontEnd/src/views/common/dialog/Dialog.tsx')

diff --git a/FrontEnd/src/views/common/dialog/Dialog.tsx b/FrontEnd/src/views/common/dialog/Dialog.tsx
index 31dd113b..9ce344dc 100644
--- a/FrontEnd/src/views/common/dialog/Dialog.tsx
+++ b/FrontEnd/src/views/common/dialog/Dialog.tsx
@@ -38,23 +38,18 @@ export default function Dialog({
       timeout={300}
       classNames="cru-dialog"
     >
-      <div
-        className={classNames("cru-dialog-overlay", `cru-${color}`)}
-        onPointerDown={
-          disableCloseOnClickOnOverlay
-            ? undefined
-            : () => {
-                onClose();
-              }
-        }
-      >
-        <div className="cru-dialog-background" />
+      <div className={classNames("cru-dialog-overlay", `cru-${color}`)}>
         <div
-          className="cru-dialog-container"
-          onPointerDown={(e) => e.stopPropagation()}
-        >
-          {children}
-        </div>
+          className="cru-dialog-background"
+          onClick={
+            disableCloseOnClickOnOverlay
+              ? undefined
+              : () => {
+                  onClose();
+                }
+          }
+        />
+        <div className="cru-dialog-container">{children}</div>
       </div>
     </CSSTransition>,
     portalElement,
-- 
cgit v1.2.3

