diff --git a/src/components/modal/nz-confirm.component.ts b/src/components/modal/nz-confirm.component.ts index ba9fc4f75f2..01607aad764 100644 --- a/src/components/modal/nz-confirm.component.ts +++ b/src/components/modal/nz-confirm.component.ts @@ -262,6 +262,9 @@ export class NzConfirmComponent implements OnInit, OnDestroy { } ngOnDestroy() { + if (this._visible) { + nzGlobalMonitor.setDocumentOverflowHidden(false); + } this.subject.next('onDestroy'); this.subject.unsubscribe(); this.subject = null; diff --git a/src/components/modal/nz-modal.component.ts b/src/components/modal/nz-modal.component.ts index 3bd6732d94c..4ff3a6b6635 100644 --- a/src/components/modal/nz-modal.component.ts +++ b/src/components/modal/nz-modal.component.ts @@ -336,6 +336,9 @@ export class NzModalComponent implements OnInit, OnDestroy, AfterViewInit { } ngOnDestroy() { + if (this._visible) { + nzGlobalMonitor.setDocumentOverflowHidden(false); + } this.subject.next('onDestroy'); this.subject.unsubscribe(); this.subject = null;