Skip to content

bug(md-tooltip): tooltip is not removed when parent is #1111

@ivoviz

Description

@ivoviz

Consider a scenario where there's a button inside a container. The button has a tooltip and on click it should set a variable to another value. Based on that value the container element is added / removed with ngIf. Simple example:

<div *ngIf="!hidden">
  <button
    md-button
    md-tooltip="Hide this button"
    tooltip-position="after"
    (click)="hidden = true">HIDE ME!</button>
</div>

After clicking the button the container div is removed, however, the tooltip remains still, no way to remove it.

Plunkr example.

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions