From 84d85e5519e52466f0eb75d9f81f07d08669faa0 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 7 Jun 2021 13:31:49 +0300 Subject: [PATCH] Fix toast directive: corrected detection of snack bar container. --- ui-ngx/src/app/shared/components/toast.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/toast.directive.ts b/ui-ngx/src/app/shared/components/toast.directive.ts index b85b115d61..452f4dc451 100644 --- a/ui-ngx/src/app/shared/components/toast.directive.ts +++ b/ui-ngx/src/app/shared/components/toast.directive.ts @@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy { ngAfterViewInit() { if (this.snackBarRef) { this.parentEl = this.data.parent.nativeElement; - this.snackBarContainerEl = this.elementRef.nativeElement.parentNode; + this.snackBarContainerEl = $(this.elementRef.nativeElement).closest('snack-bar-container')[0]; this.snackBarContainerEl.style.position = 'absolute'; this.updateContainerRect(); this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig);