From f37f8e8a8fdec82e9241515cccf112a43eb9a156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Tue, 14 May 2024 10:47:38 +0300 Subject: [PATCH] Fixed #15545 - Tooltip visual issue --- src/app/components/tooltip/tooltip.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/components/tooltip/tooltip.ts b/src/app/components/tooltip/tooltip.ts index 52447367e00..4d59ee6c1eb 100755 --- a/src/app/components/tooltip/tooltip.ts +++ b/src/app/components/tooltip/tooltip.ts @@ -430,9 +430,16 @@ export class Tooltip implements AfterViewInit, OnDestroy { this.create(); - setTimeout(() => { - this.container && this.align(); - }, 100); + const nativeElement = this.el.nativeElement; + const pDialogWrapper = nativeElement.closest('p-dialog'); + + if (pDialogWrapper) { + setTimeout(() => { + this.container && this.align(); + }, 100); + } else { + this.align(); + } DomHandler.fadeIn(this.container, 250);