Skip to content

Commit 2a514bb

Browse files
always clear show delay timeout on hide
1 parent acaa612 commit 2a514bb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/components/Tooltip/Tooltip.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,8 @@ const Tooltip = ({
8282
handleShow(false)
8383
}
8484

85-
if (show && tooltipShowDelayTimerRef.current) {
85+
if (tooltipShowDelayTimerRef.current) {
8686
clearTimeout(tooltipShowDelayTimerRef.current)
87-
} else if (!show && tooltipShowDelayTimerRef.current) {
88-
// workaround to prevent tooltip being show forever
89-
// when we remove the mouse before show tooltip with `delayShow`
90-
tooltipHideDelayTimerRef.current = setTimeout(() => {
91-
handleShow(false)
92-
}, delayShow * 2)
9387
}
9488
}
9589

0 commit comments

Comments
 (0)