Skip to content

Commit

Permalink
fix: 修复 popup 内容超长滚动问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicleo committed Oct 17, 2023
1 parent c1490ca commit 6b13b65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions packages/zarm/src/modal/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,19 @@ const Demo = () => {

<div id="test-div" style={{ position: 'relative', zIndex: 1 }} ref={myRef} />

<Modal visible={state.normal.visible} title="标题" closable onClose={() => toggle('normal')}>
模态框内容
<Modal
visible={state.normal.visible}
title="标题"
closable
onClose={() => toggle('normal')}
maskClosable
>
{Array.from(Array(100).fill(0)).map((_, index) => (
<div key={index}>
模态框内容
<br />
</div>
))}
</Modal>

<Modal
Expand Down
1 change: 0 additions & 1 deletion packages/zarm/src/popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const Popup = React.forwardRef<HTMLDivElement, PopupProps>((props, ref) => {
}, []);

const handleClick = (event: React.MouseEvent) => {
event.stopPropagation();
if (nodeRef.current !== event.target && nodeRef.current.contains(event.target as HTMLElement)) {
return;
}
Expand Down

0 comments on commit 6b13b65

Please sign in to comment.