From 463b22afb4d023a83f72810459733535e0a4bcf7 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Tue, 20 Jun 2023 10:41:13 -0300 Subject: [PATCH 1/2] build: update browser list --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" From 3a3d5485130946f657e3995f612f12d092c0ac08 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Tue, 20 Jun 2023 10:41:43 -0300 Subject: [PATCH 2/2] fix: clear timeouts on anchor unmount --- src/components/Tooltip/Tooltip.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) 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