From 1384ec690859e3b8e79189ae2c615764a4853f9e Mon Sep 17 00:00:00 2001 From: Fndroid Date: Sun, 25 Oct 2020 19:01:33 +0800 Subject: [PATCH] Fix: replace onClick with onMouseDown for Modal (#57) --- src/components/Modal/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index cbe29ca..30d9f39 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -60,7 +60,7 @@ export function Modal (props: ModalProps) { return () => { document.body.removeChild(current) } }, []) - function handleMaskClick (e: MouseEvent) { + function handleMaskMouseDown (e: MouseEvent) { if (e.target === maskRef.current) { onClose() } @@ -70,7 +70,7 @@ export function Modal (props: ModalProps) {