diff --git a/packages/x-charts/src/hooks/useInteractionItemProps.ts b/packages/x-charts/src/hooks/useInteractionItemProps.ts index 8e6aee6c538a..d1230d3fbb23 100644 --- a/packages/x-charts/src/hooks/useInteractionItemProps.ts +++ b/packages/x-charts/src/hooks/useInteractionItemProps.ts @@ -32,7 +32,9 @@ export const useInteractionItemProps = (skip?: boolean) => { }); }; const onPointerLeave = (event: React.PointerEvent) => { - event.currentTarget.releasePointerCapture(event.pointerId); + if (event.currentTarget.hasPointerCapture(event.pointerId)) { + event.currentTarget.releasePointerCapture(event.pointerId); + } store.update((prev) => { const prevItem = prev.interaction.item;