Skip to content

Commit

Permalink
fix: antd-mobile picker 快速点击两次后页面不能滚动
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjie Li committed Sep 8, 2020
1 parent 9760e83 commit 792a475
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ export default class Dialog extends React.Component<IDialogPropTypes, any> {

componentWillUnmount() {
// fix: react@16 no dismissing animation
document.body.style.overflow = '';
if (this.wrapRef) {
this.wrapRef.style.display = 'none';
}
setTimeout(() => {
document.body.style.overflow = '';
if (this.wrapRef) {
this.wrapRef.style.display = 'none';
}
}, 0);
}

getZIndexStyle() {
Expand Down

0 comments on commit 792a475

Please sign in to comment.