You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
I have a Tooltip component that looks like this:
Tooltip component that has both the openOnClick (or openEvents={{ click: true }} ) and globalCloseEvents={{ clickOutsideAnchor: true }} props, does not combine their behavior.
Version of Package
v5.28.0
To Reproduce
Create a Tooltip with both openOnClick & globalCloseEvents.
Expected behavior
I expect the the tooltip to be shown on click on the #anchorSelect anchor and to be closed on another click. I also expect to close the tooltip on click outside the Tooltip. Instead the clickOutsideAnchor doesn't work and clicking outside the #anchorSelect does not work
Screenshots
If applicable, add screenshots to help explain your problem.
JMLexLExter
changed the title
[BUG]
[BUG] combination of openOnClick & globalCloseEvents with clickOutsideAnchor does not close on click outside anchor
Oct 9, 2024
How are you using isOpen? You might be having issues with controlled/uncontrolled state for the tooltip. Please try providing a code sandbox reproducing the issue.
Also check #1220 and see if it relates to your issue.
@richhapal@gabrieljablonski Thank you both for a quick response, sorry for the late reply, this issue priority changed.
I tried to create a sandbox where the issue was replicated, but Instead I find out that the reason was me incorrectly assuming how setIsOpen works. After setting it up correctly and checking that svg need pointer-events: none.
Bug description
I have a Tooltip component that looks like this:
Tooltip component that has both the
openOnClick
(oropenEvents={{ click: true }}
) andglobalCloseEvents={{ clickOutsideAnchor: true }}
props, does not combine their behavior.Version of Package
v5.28.0
To Reproduce
Create a Tooltip with both
openOnClick
&globalCloseEvents
.Expected behavior
I expect the the tooltip to be shown on click on the #anchorSelect anchor and to be closed on another click. I also expect to close the tooltip on click outside the Tooltip. Instead the
clickOutsideAnchor
doesn't work and clicking outside the #anchorSelect does not workScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
"react": "^18.2.0",
"styled-components": "^5.3.6",
"typescript": "^5.5.4"
The text was updated successfully, but these errors were encountered: