feat(MatTooltip): Mimic native tooltip behaviour
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
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.
```html
Mat Tooltip
Native Tooltip
```
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](https://mat-tooltip-vs-native-tooltip.stackblitz.io)
#### Use Case
Whenever you need to show different tooltips for parent and child elements.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et examinez le comportement de MatTooltip pour les éléments imbriqués. C'est terminé lorsque le survol du span imbriqué affiche uniquement son tooltip, tandis que le tooltip du bouton parent continue de s'afficher lorsque le bouton lui-même est survolé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100