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 = ({
477477 const enabledEvents : { event : string ; listener : ( event ?: Event ) => void } [ ] = [ ]
478478
479479 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+ */
481485 return
482486 }
483487 handleShowTooltip ( event )
484488 }
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+ */
487494 return
488495 }
489496 handleHideTooltip ( )
You can’t perform that action at this time.
0 commit comments