From cf806038d30b295911d766a0ac60135dadf1556b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 13 Feb 2026 08:35:28 +0100 Subject: [PATCH] fix(tooltip): prevent stuck tooltips on rapid hover Clear existing timeout in showTooltip() before starting a new one. This prevents orphaned timeouts from firing after mouse has left. --- apps/fluux/src/components/Tooltip.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/fluux/src/components/Tooltip.tsx b/apps/fluux/src/components/Tooltip.tsx index 8bd8fbe..a2ebfa0 100644 --- a/apps/fluux/src/components/Tooltip.tsx +++ b/apps/fluux/src/components/Tooltip.tsx @@ -64,6 +64,10 @@ export function Tooltip({ const showTooltip = () => { if (effectiveDisabled) return + // Clear any existing timeout to prevent orphaned timeouts from firing + if (timeoutRef.current) { + clearTimeout(timeoutRef.current) + } timeoutRef.current = setTimeout(() => { setIsVisible(true) }, delay)