Skip to content

Commit

Permalink
fix(utils): Cancel hover mode timers on click
Browse files Browse the repository at this point in the history
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
Original file line number Diff line number Diff line change
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.