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

Unable to stop propogation in react-tooltip #137

Closed
vineethasok opened this issue Jun 22, 2021 · 4 comments
Closed

Unable to stop propogation in react-tooltip #137

vineethasok opened this issue Jun 22, 2021 · 4 comments

Comments

@vineethasok
Copy link

I have a nested component with the react-popper-tooltip
When I right click the innermost contextmenu the outermost contextmenu is also opening
I tried e.stopPropogation and e.stopImmediatePropagation in onClick and onContextMenu
But it is still opening the outermost element
Any tips or workaround are appreciated

@mohsinulhaq
Copy link
Owner

Can you create a codesandbox where I can see the issue in action?

@vineethasok
Copy link
Author

https://codesandbox.io/embed/determined-frog-j6s6q
Click on the bottom content
It will open 2 tooltip

@mohsinulhaq
Copy link
Owner

@vineethasok to get nested tooltips working, you would have to use the null trigger and implement the outside click handling yourself.
If you want to quickly create nested tooltips, you should consider v3 of the library (https://github.com/mohsinulhaq/react-popper-tooltip/blob/v3/README.md). v4 moved to a much simpler model with hooks.

@mohsinulhaq
Copy link
Owner

Closing this as resolved.
Feel free to re-open if needed.

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

No branches or pull requests

2 participants