Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(utils): Cancel hover mode timers on click
This is mostly added since it'll make the onMouseLeave behavior disabled
for tooltips.
  • Loading branch information
mlaursen committed Apr 23, 2021
1 parent 1165471 commit 892dc24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/utils/src/hover/useHoverMode.ts
Expand Up @@ -318,6 +318,8 @@ export function useHoverMode<E extends HTMLElement>({
}

startDisableTimer();
window.clearTimeout(enterTimeoutRef.current);
window.clearTimeout(exitTimeoutRef.current);
},
[disabled, propOnClick, startDisableTimer]
);
Expand Down

0 comments on commit 892dc24

Please sign in to comment.