angular/components

Delayed tooltip still shown if clicked prior to matTooltipShowDelay

已關閉

#8,065 建立於 2017年10月27日

 (5 則留言) (0 個反應) (0 位負責人)TypeScript (6,650 個分叉)batch import
P3area: material/tooltiphelp wanted

倉庫指標

星標
 (24,044 顆星)
PR 合併指標
 (平均合併 3天 12小時) (30 天內合併 98 個 PR)

描述

Bug, feature request, or proposal:

Bug: Delayed tooltip is still shown if element is clicked prior to matTooltipShowDelay

What is the expected behavior?

A delayed tooltip should not be shown if element is clicked prior to the matTooltipShowDelay time being reached.

What is the current behavior?

A tooltip with matTooltipShowDelay set to a positive value will be displayed even if the element is clicked before the delay time is reached. A click after the delay time is reached and the tooltip is shown will correctly hide the tooltip.

For at least a button element, when the element does not have focus and mouseenter and click occur prior to matTooltipShowDelay, the tooltip is correctly not shown. However, if the element has focus prior to these events, the tooltip is incorrectly shown even after a click.

What are the steps to reproduce?

http://plnkr.co/edit/qfWnfq0pxHRS0hJKMSRZ

What is the use-case or motivation for changing an existing behavior?

Tooltips that are still displayed after click can sometimes obscure underlying elements.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.4.6 Material 2.0.0-beta.12-0ea4370 Windows 10 Chrome 61.0.3163.100 Typescript 2.5.3

Is there anything else we should know?

貢獻者指南