Commit 84d85e5519e52466f0eb75d9f81f07d08669faa0
1 parent
31ebf4e6
Fix toast directive: corrected detection of snack bar container.
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy { |
312 | 312 | ngAfterViewInit() { |
313 | 313 | if (this.snackBarRef) { |
314 | 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 | 316 | this.snackBarContainerEl.style.position = 'absolute'; |
317 | 317 | this.updateContainerRect(); |
318 | 318 | this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig); | ... | ... |