Skip to content

Commit

Permalink
Fix #5312: Tooltip left behind on slow machine
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 15, 2023
1 parent d9fa7f6 commit 360fadd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/lib/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export const Tooltip = React.memo(
return () => {
unloadTargetEvents();
};
}, [show, hide, props.target]);
}, [visibleState, props.target]);

useUpdateEffect(() => {
if (visibleState) {
Expand Down Expand Up @@ -469,9 +469,7 @@ export const Tooltip = React.memo(
}, [props.content]);

useUnmountEffect(() => {
clearTimeouts();
unloadTargetEvents();

hide();
ZIndexUtils.clear(elementRef.current);
});

Expand Down

0 comments on commit 360fadd

Please sign in to comment.