diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 20b39b40..f5960943 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -276,6 +276,9 @@ const Tooltip = ({ return } handleShow(false) + if (tooltipShowDelayTimerRef.current) { + clearTimeout(tooltipShowDelayTimerRef.current) + } } const handleEsc = (event: KeyboardEvent) => { @@ -403,6 +406,12 @@ const Tooltip = ({ setRendered(false) handleShow(false) setActiveAnchor(null) + if (tooltipShowDelayTimerRef.current) { + clearTimeout(tooltipShowDelayTimerRef.current) + } + if (tooltipHideDelayTimerRef.current) { + clearTimeout(tooltipHideDelayTimerRef.current) + } return true } return false diff --git a/yarn.lock b/yarn.lock index b49fee3f..3a86238a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2079,9 +2079,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001449: - version "1.0.30001466" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz#c1e6197c540392e09709ecaa9e3e403428c53375" - integrity sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w== + version "1.0.30001505" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz" + integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A== caseless@~0.12.0: version "0.12.0"