Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove zombie tooltips with MutationObserver #2421

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Dec 1, 2017

Previously, we were removing tooltips of elements that are removed from DOM (they remain on the page permanently) by polling the element to see if it's still hovered.

Instead of polling the tooltip to see if it is still hovered, this commit introduce a mutation observer.

@kennyadsl kennyadsl added changelog:solidus_backend Changes to the solidus_backend gem UI labels Dec 1, 2017
@kennyadsl kennyadsl self-assigned this Dec 1, 2017
@tvdeyen
Copy link
Member

tvdeyen commented Dec 1, 2017

Build errors will be fixed by #2423

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Instead of polling the tooltip to see if it is still hovered, this
commit introduce a mutation observer in order to remove the tooltip
of elements that are removed from the DOM.
Copy link
Contributor

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much better than my setInterval hack ❤️

@jhawthorn jhawthorn merged commit 3dec887 into solidusio:master Dec 5, 2017
@kennyadsl kennyadsl deleted the improve-tooltips branch October 3, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants