Skip to content

Commit

Permalink
Fixed #6905 Revert maximize should not remove modal blockScroll
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Oct 1, 2019
1 parent 3cee231 commit b093f8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,10 @@ export class Dialog implements OnDestroy {
this.contentViewChild.nativeElement.style.height = 'calc(100vh - ' + diffHeight +'px)';

DomHandler.addClass(this.container, 'ui-dialog-maximized');
DomHandler.addClass(document.body, 'ui-overflow-hidden');
if(!this.blockScroll) {
DomHandler.addClass(document.body, 'ui-overflow-hidden');
}

this.moveOnTop();

this.maximized = true;
Expand All @@ -370,7 +373,9 @@ export class Dialog implements OnDestroy {
this.container.style.height = this.preMaximizeContainerHeight + 'px';
this.contentViewChild.nativeElement.style.height = this.preMaximizeContentHeight + 'px';

DomHandler.removeClass(document.body, 'ui-overflow-hidden');
if (!this.blockScroll) {
DomHandler.removeClass(document.body, 'ui-overflow-hidden');
}

this.maximized = false;

Expand Down

0 comments on commit b093f8e

Please sign in to comment.