From a3cbae031012afe721bbacb0342e7937aeaa5f46 Mon Sep 17 00:00:00 2001 From: DiC Date: Mon, 6 Aug 2018 09:24:59 +0300 Subject: [PATCH] Update dialog.ts this PR should fix https://github.com/primefaces/primeng/issues/5974 and https://github.com/primefaces/primeng/issues/5336 --- src/app/components/dialog/dialog.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/components/dialog/dialog.ts b/src/app/components/dialog/dialog.ts index 8885d331f1a..479aedd5f21 100644 --- a/src/app/components/dialog/dialog.ts +++ b/src/app/components/dialog/dialog.ts @@ -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) {