Skip to content

Commit eac8e65

Browse files
shaodahongafc163
authored andcommitted
fix: scrollbar width
1 parent 6f05390 commit eac8e65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Dialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,9 @@ export default class Dialog extends React.Component<IDialogChildProps, any> {
389389
overflowY: document.body.style.overflowY,
390390
overflow: document.body.style.overflow,
391391
} as ICacheOverflow;
392-
document.body.style.overflow = 'hidden';
393392
switchScrollingEffect();
393+
// Must be set after switchScrollingEffect
394+
document.body.style.overflow = 'hidden';
394395
} else if (!openCount) {
395396
// IE browser doesn't merge overflow style, need to set it separately
396397
// https://github.com/ant-design/ant-design/issues/19393

0 commit comments

Comments
 (0)