From 287ca2ed38731d673f6eb67576135bfbc7673118 Mon Sep 17 00:00:00 2001 From: jeromelin Date: Sat, 7 Oct 2023 14:05:08 +0800 Subject: [PATCH] fix: maskClosable of popup not work --- packages/zarm/src/popup/Popup.tsx | 14 ++++++++++---- packages/zarm/src/popup/style/component.scss | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/zarm/src/popup/Popup.tsx b/packages/zarm/src/popup/Popup.tsx index 190f5cfb9..f467b64e3 100644 --- a/packages/zarm/src/popup/Popup.tsx +++ b/packages/zarm/src/popup/Popup.tsx @@ -67,9 +67,6 @@ const Popup = React.forwardRef((props, ref) => { mountContainer={props.mountContainer} forceRender={forceRender} destroy={destroy} - onClick={() => { - onMaskClick?.(); - }} /> )} ((props, ref) => { const { display, ...restStyle } = style; return renderToContainer( props.mountContainer ?? globalMountContainer, -
+
{ + onMaskClick?.(); + }} + >
((props, ref) => { ...restStyle, width, }} + onClick={(e) => { + e.stopPropagation(); + }} > {children}
diff --git a/packages/zarm/src/popup/style/component.scss b/packages/zarm/src/popup/style/component.scss index 10d6df194..ea2996ec6 100644 --- a/packages/zarm/src/popup/style/component.scss +++ b/packages/zarm/src/popup/style/component.scss @@ -1,7 +1,6 @@ @include b(popup) { -webkit-overflow-scrolling: touch; margin: auto; - pointer-events: all; transform: perspective(0); @include e(wrapper) {