-
Notifications
You must be signed in to change notification settings - Fork 517
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
Prevent bubbling for tooltips of nested elements #259
Comments
You can control the functionality of tooltips with custom logic. So while there's not (that I can think of) a declarative/automatic solution that the library does, you can always do it yourself. In particular, you can make the parent listen for Let me know if this works. parent.addEventListener('mouseout', e => {
if (e.target._tippy) {
parent._tippy.hide()
}
}) |
Thanks a lot, it works! |
Ha yeah, |
Hello!
In my project there are two nested divs: one inside another. Each div has its own tooltip.
The problem is: when I hover nested div, there are two tooltips: one of hovered div and other -- of its parent due to event bubbling. How can I prevent such behavior? The result I try to get: hovering nested div there should be only one tooltip: the tooltip of this div. Here you can see the example of problem:
https://codesandbox.io/s/6y6k0kl1lw
Thank you!
The text was updated successfully, but these errors were encountered: