Skip to content

Commit

Permalink
fix: maskClosable of popup not work
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Oct 7, 2023
1 parent 57cbf25 commit 287ca2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 10 additions & 4 deletions packages/zarm/src/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ const Popup = React.forwardRef<HTMLDivElement, PopupProps>((props, ref) => {
mountContainer={props.mountContainer}
forceRender={forceRender}
destroy={destroy}
onClick={() => {
onMaskClick?.();
}}
/>
)}
<Transition
Expand All @@ -96,14 +93,23 @@ const Popup = React.forwardRef<HTMLDivElement, PopupProps>((props, ref) => {
const { display, ...restStyle } = style;
return renderToContainer(
props.mountContainer ?? globalMountContainer,
<div className={bem('wrapper', [props.className])} style={{ ...props.style, display }}>
<div
className={bem('wrapper', [props.className])}
style={{ ...props.style, display }}
onClick={() => {
onMaskClick?.();
}}
>
<div
ref={setNodeRef}
className={bem([{ [`${direction}`]: !!direction }, className])}
style={{
...restStyle,
width,
}}
onClick={(e) => {
e.stopPropagation();
}}
>
{children}
</div>
Expand Down
1 change: 0 additions & 1 deletion packages/zarm/src/popup/style/component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@include b(popup) {
-webkit-overflow-scrolling: touch;
margin: auto;
pointer-events: all;
transform: perspective(0);

@include e(wrapper) {
Expand Down

0 comments on commit 287ca2e

Please sign in to comment.