-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/tooltipfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
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.
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/tooltipfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix