angular / angular/components

feat(MatTooltip): Mimic native tooltip behaviour

オープン
#20,091 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/tooltip feature P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされた StackBlitz の再現コードから始め、ネストされた要素に対する MatTooltip の動作を確認します。ネストされた span にホバーしたときはその tooltip のみが表示され、親 button 自体にホバーしたときは親 button の tooltip が引き続き表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。