Skip to content

Delayed tooltip still shown if clicked prior to matTooltipShowDelay #8065

Open
@ajshapiro

Description

@ajshapiro

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tooltiphelp wantedThe team would appreciate a PR from the community to address this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions