Commit 84d85e5519e52466f0eb75d9f81f07d08669faa0

Authored by Igor Kulikov
1 parent 31ebf4e6

Fix toast directive: corrected detection of snack bar container.

@@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy { @@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy {
312 ngAfterViewInit() { 312 ngAfterViewInit() {
313 if (this.snackBarRef) { 313 if (this.snackBarRef) {
314 this.parentEl = this.data.parent.nativeElement; 314 this.parentEl = this.data.parent.nativeElement;
315 - this.snackBarContainerEl = this.elementRef.nativeElement.parentNode; 315 + this.snackBarContainerEl = $(this.elementRef.nativeElement).closest('snack-bar-container')[0];
316 this.snackBarContainerEl.style.position = 'absolute'; 316 this.snackBarContainerEl.style.position = 'absolute';
317 this.updateContainerRect(); 317 this.updateContainerRect();
318 this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig); 318 this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig);