Skip to content

Commit 9f65704

Browse files
committed
fix: overflow of modal height
1 parent f6eceb6 commit 9f65704

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/Modal/ModalBase.web.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class ModalBase extends React.PureComponent<ModalBaseProps> {
3939
if (visible) {
4040
if (!isBackgroundScrollable) {
4141
document.body.style.overflow = 'hidden';
42+
document.body.style.height = '100vh';
4243
}
4344

4445
if (this.content.current) {
@@ -53,6 +54,7 @@ class ModalBase extends React.PureComponent<ModalBaseProps> {
5354
} else {
5455
if (!isBackgroundScrollable) {
5556
document.body.style.overflow = '';
57+
document.body.style.height = '';
5658
}
5759
}
5860
}
@@ -76,6 +78,7 @@ class ModalBase extends React.PureComponent<ModalBaseProps> {
7678
backgroundColor: transparent ? 'transparent' : 'white',
7779
bottom: 0,
7880
left: 0,
81+
overflow: 'auto',
7982
position: isBackgroundScrollable ? 'absolute' : 'fixed',
8083
right: 0,
8184
top: 0,

0 commit comments

Comments
 (0)