Skip to content

Commit

Permalink
[charts] Do not remove mouse position for mouseUp event
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Aug 13, 2024
1 parent 51ec133 commit 9fe674a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/x-charts/src/ChartsTooltip/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export function useMouseTracker() {
return () => {};
}

const handleOut = () => {
setMousePosition(null);
const handleOut = (event: PointerEvent) => {
if (event.pointerType !== 'mouse') {
setMousePosition(null);
}
};

const handleMove = (event: PointerEvent) => {
Expand Down

0 comments on commit 9fe674a

Please sign in to comment.