From 76fa000a0540c677b43bbbdef6562d4386e53e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Fri, 27 May 2022 17:49:15 +0300 Subject: [PATCH] Fixed #11563 - Toast | wrong zIndex problem --- src/app/components/toast/toast.ts | 3 +-- src/app/showcase/components/toast/toastdemo.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/components/toast/toast.ts b/src/app/components/toast/toast.ts index f0051f493bc..fcba932e584 100755 --- a/src/app/components/toast/toast.ts +++ b/src/app/components/toast/toast.ts @@ -296,8 +296,7 @@ export class Toast implements OnInit,AfterContentInit,OnDestroy { onAnimationStart(event: AnimationEvent) { if (event.fromState === 'void') { this.containerViewChild.nativeElement.setAttribute(this.id, ''); - - if (this.autoZIndex) { + if (this.autoZIndex && this.containerViewChild.nativeElement.style.zIndex === '') { ZIndexUtils.set('modal', this.containerViewChild.nativeElement, this.baseZIndex || this.config.zIndex.modal); } } diff --git a/src/app/showcase/components/toast/toastdemo.html b/src/app/showcase/components/toast/toastdemo.html index 73844aa4dc2..1dd41fcf63e 100755 --- a/src/app/showcase/components/toast/toastdemo.html +++ b/src/app/showcase/components/toast/toastdemo.html @@ -7,7 +7,7 @@