Skip to content

Commit

Permalink
Update dialog.ts
Browse files Browse the repository at this point in the history
this PR should fix primefaces#5974 and primefaces#5336
  • Loading branch information
dicbrus authored Aug 6, 2018
1 parent 1228325 commit a3cbae0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ export class Dialog implements OnDestroy {
let viewport = this.domHandler.getViewport();
if (this.domHandler.getOuterHeight(this.container) > viewport.height) {
this.contentViewChild.nativeElement.style.height = (viewport.height * .75) + 'px';
this.container.style.height = 'auto';
} else {
this.contentViewChild.nativeElement.style.height = null;
if (this.height) {
this.container.style.height = this.height + 'px';
}
}

if (this.positionLeft >= 0 && this.positionTop >= 0) {
Expand Down

0 comments on commit a3cbae0

Please sign in to comment.