google / google/material-design-lite

Tooltip is not removed if target element are removed dynamically

Open
#5,111 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

I made a minimal replication of the issue here:

https://jsfiddle.net/s2LzLc68/1/

This might look like a weird use-case, but if the clickable text is a link, and the link performs an ajax-loading of content, replacing the link, the tooltip will stay.

A workaround would be removing all instances of .mdl-tooltip in the DOM when ajax-loading resources, or on click events with .mdl-tooltip as target.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.