-
Notifications
You must be signed in to change notification settings - Fork 90
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
Tooltip flickers when hovering SVG #1067
Comments
This issue is not reproducible anymore from Additional Thoughts (beyond the scope of this issue): |
Looks like you're correct! It seems this issue has been resolved since it's initial report and you're likely correct about it being remedied with the 100ms delay. I can't recall why there's two separate commits introducing the delay, but some more context could be found in this PR. tl;dr: Tooltips need to persist when hovered and adding a small delay to the hide function will prevent it from hiding when the user moves their mouse from the triggering element to the tooltip itself. See also: "W3C: Understanding Success Criterion 1.4.13: Content on Hover or Focus" and this PR comment.
You're right, we really should have more robust testing in Stacks. Soon we could decide to codify an approach to testing in Stacks when we have some bandwidth. Testing functionality should be relatively straightforward and I'd also like to update our approach to visual regression testing. It's something I'd be eager to explore with you! |
Thanks @dancormier for the additional context. 😊 |
When including an SVG within an element that renders a tooltip, the tooltip will rerender when the user hovers over the SVG. My hunch is that it has to do with popper.js but I haven't verified this. Issue demonstrated here: https://codepen.io/dc-so/pen/JjLxJxd
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The tooltip shouldn't flicker.
cc @KyleMit @tmcentee
The text was updated successfully, but these errors were encountered: