Skip to content

Commit 31e9100

Browse files
committed
refactor(material/tooltip): render tooltips as popovers
Tests out rendering tooltips as popovers inside the overlay container.
1 parent 1a92e22 commit 31e9100

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/material/tooltip/tooltip.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ export class MatTooltip implements OnDestroy, AfterViewInit {
508508
.withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`)
509509
.withFlexibleDimensions(false)
510510
.withViewportMargin(this._viewportMargin)
511-
.withScrollableContainers(scrollableAncestors);
511+
.withScrollableContainers(scrollableAncestors)
512+
.withPopoverLocation('global');
512513

513514
strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {
514515
this._updateCurrentPositionClass(change.connectionPair);
@@ -528,6 +529,7 @@ export class MatTooltip implements OnDestroy, AfterViewInit {
528529
panelClass: this._overlayPanelClass ? [...this._overlayPanelClass, panelClass] : panelClass,
529530
scrollStrategy: this._injector.get(MAT_TOOLTIP_SCROLL_STRATEGY)(),
530531
disableAnimations: this._animationsDisabled,
532+
usePopover: true,
531533
});
532534

533535
this._updatePosition(this._overlayRef);

0 commit comments

Comments
 (0)