We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15ce545 commit bed7c74Copy full SHA for bed7c74
packages/react/src/TooltipV2/Tooltip.tsx
@@ -214,7 +214,7 @@ export const Tooltip = React.forwardRef(
214
215
const [isPopoverOpen, setIsPopoverOpen] = useState(false)
216
217
- const timeoutRef = React.useRef(0)
+ const timeoutRef = React.useRef<number | null>(null)
218
219
const {safeSetTimeout, safeClearTimeout} = useSafeTimeout()
220
@@ -377,7 +377,10 @@ export const Tooltip = React.forwardRef(
377
}, 50)
378
},
379
onMouseLeave: (event: React.MouseEvent) => {
380
- safeClearTimeout(timeoutRef.current)
+ if (timeoutRef.current) {
381
+ safeClearTimeout(timeoutRef.current)
382
+ timeoutRef.current = null
383
+ }
384
closeTooltip()
385
child.props.onMouseLeave?.(event)
386
0 commit comments