Open
Description
Feature Description
If nested elements have MatTooltip
s applied on them, show the innermost tooltip.
Suppose we have a button
with a span
inside it.
<button mat-raised-button matTooltip="Button tooltip">
<span matTooltip="Span tooltip">Mat Tooltip</span>
</button>
<button mat-raised-button title="Button tooltip">
<span title="Span tooltip">Native Tooltip</span>
</button>
If both of these elements have the title
attribute applied to them and we hover the span
, the browser shows title
text of the span.
However, if we use the MatTooltip
directive, both tooltips are shown to the user.
Minimal Reproduction on StackBlitz
Use Case
Whenever you need to show different tooltips for parent and child elements.