-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tooltipneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bug
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
I am using MatToolTip and I encounter them often being empty like this:
Each hover creates an additional empty bubble with an offset to the right. I can't replicate this on Stackblitz yet.
My component looks like this:
foo.component.html
<div *ngIf="project">
<button mat-icon-button type="button" matTooltip="XYZ">
Hover me
</button>
</div>
foo.component.ts
...
@Input() project: FooProject | null;
...
foo.component.scss
// Empty
I made two observations:
- Pressing a keyboard input like CTRL or ALT will update the view and show the correct tooltip.
- Removing
*ngIf
or setting it totrue
will result in a correct tooltip behaviour.
This is how the DOM looks like if the tooltip is empty:
<div class="cdk-overlay-container">
<div class="cdk-overlay-connected-position-bounding-box" dir="ltr"
style="top: 0px; left: 0px; height: 100%; width: 100%;">
<div id="cdk-overlay-8" class="cdk-overlay-pane mat-tooltip-panel" style="top: 303px; left: 510.273px;">
<mat-tooltip-component aria-hidden="true" class="ng-tns-c42-131">
<div class="mat-tooltip ng-tns-c42-131 ng-trigger ng-trigger-state"></div>
</mat-tooltip-component>
</div>
</div>
</div>
Reproduction
Steps to reproduce:
- Hover over the tooltip.
Expected Behavior
This is how it should look like.
Actual Behavior
The tooltips are empty.
Environment
- Angular: 11.2.13
- CDK/Material: 11.2.13
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS, Windows, Linux
burnaDLX, Harpush and llorenspujol
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tooltipneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bugThe issue does not contain enough information for the team to determine if it is a real bug