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);