tooltip: buggy when deployed as an Angular Element
See original GitHub issueWhat is the expected behavior?
That tooltips are not buggy.
What is the current behavior?
Tooltips are buggy.
What are the steps to reproduce?
app.module.ts
import { MatTooltipModule } from '@angular/material/tooltip';
somecomponent.component.html
<button mat-button class="button" (click)="openDialog()" matTooltip="Åpne" aria-label="Åpne"> ÅPNE</button>
And then deploy the whole project as an Angular Element.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular CLI: 7.3.6 Node: 10.15.2 OS: win32 x64 Angular: 7.2.10 @angular/material 7.3.5 typescript 3.1.1 Chrome Version 73.0.3683.86 (Official Build) (64-bit)
Is there anything else we should know?
Every time i hover on the button, a small grey “blob” is added to a “row” under the address-field in my browser.
When i click the button, a “tick()” is triggered (because angular elements needs that without ngZone) and the row of grey blobs is replaced with the tooltip. It’s in the wrong spot, but it’s there. I suspect this has something to do with how “Angular Elements” work? Since the grey blobs were only “converted” to the tooltip after a “tick()”?
@levgaas posted the same issue a year ago, but did not specify how he managed to fix it: https://github.com/angular/material2/issues/11361
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:23 (4 by maintainers)
Top GitHub Comments
Is there any progress/solution for this problem. We are also experiencing the same isue with the tooltips.
Just in case anyone else has problems with this, we ended up “hiding” the original tooltips in the paginator and adding our own using “pure css”. It’s not pretty, but it works while this gets sorted out.
in styles.scss (to hide the existing tooltip):
mat-tooltip-component > .mat-tooltip { display: none; }
Added the following code to the .scss file of the component where we have the paginator: (Stole some code from this guide by @yjose: https://medium.freecodecamp.org/a-step-by-step-guide-to-making-pure-css-tooltips-3d5a3e237346)