Skip to content

Commit

Permalink
fix(module:modal): restore body overflow before destroyed the compone…
Browse files Browse the repository at this point in the history
…nt (#415)

close #412
  • Loading branch information
hsuanxyz authored and wilsoncook committed Oct 14, 2017
1 parent dca0895 commit 083dd03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/modal/nz-confirm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/components/modal/nz-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 083dd03

Please sign in to comment.