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

Fix bug when tooltip anchor is removed from document without being unmounted #1119

Conversation

chandlerprall
Copy link
Contributor

Fixes #1105 by adding a requestAnimationFrame loop when a tooltip is open, each iteration tests if the anchor element is contained by document.

Tested in Chrome, FF, and Safari by linking EUI module into Kibana and testing the ML panel @jgowdyelastic reported issue with.

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

@chandlerprall and I think this is a roundabout solution to the problem because it basically constantly checks while the tooltip is up. We're going to make an issue to revisit it later. We did however want a quick solution for 6.4 that would help the ML team. I can't see any new issues this strategy creates.

I tested this in IE11, Firefox and chrome in as many tooltip usages (context menus, focused inputs, icontips...etc) as I could think of. Along with checking ML, I also tested by manually destroying the anchor through inspect / and debug tools. It seems to solve the issue.

I think this is a big enough issue for ML that we're going to release a new build of EUI in 6.4 with it.

@chandlerprall chandlerprall merged commit d648df9 into elastic:master Aug 15, 2018
@chandlerprall chandlerprall deleted the bug/1105-tooltip-with-unmounted-react-tree branch August 15, 2018 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants