Skip to content

Commit

Permalink
[charts] Do not remove mouse position for mouseUp event (mui#14187)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Aug 13, 2024
1 parent c9bf6fc commit 0c21145
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 0c21145

Please sign in to comment.