File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -477,13 +477,20 @@ const Tooltip = ({
477
477
const enabledEvents : { event : string ; listener : ( event ?: Event ) => void } [ ] = [ ]
478
478
479
479
const handleClickOpenTooltipAnchor = ( event ?: Event ) => {
480
- if ( show ) {
480
+ if ( show && event ?. target === activeAnchor ) {
481
+ /**
482
+ * ignore clicking the anchor that was used to open the tooltip.
483
+ * this avoids conflict with the click close event.
484
+ */
481
485
return
482
486
}
483
487
handleShowTooltip ( event )
484
488
}
485
- const handleClickCloseTooltipAnchor = ( ) => {
486
- if ( ! show ) {
489
+ const handleClickCloseTooltipAnchor = ( event ?: Event ) => {
490
+ if ( ! show || event ?. target !== activeAnchor ) {
491
+ /**
492
+ * same reasoning as above, opposite logic.
493
+ */
487
494
return
488
495
}
489
496
handleHideTooltip ( )
You can’t perform that action at this time.
0 commit comments