add padding-right when popup shows

This commit is contained in:
Leopoldthecoder
2016-09-23 18:03:01 +08:00
parent a761531172
commit 71dc5bedf3
6 changed files with 42 additions and 26 deletions

View File

@@ -79,9 +79,14 @@
this.onClose && this.onClose();
if (this.modal && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
}
setTimeout(() => {
if (this.modal && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
document.body.style.paddingRight = this.bodyPaddingRight;
}
this.bodyOverflow = null;
this.bodyPaddingRight = null;
}, 200);
this.opened = false;
if (!this.transition) {