Skip to content

Commit

Permalink
fix(interaction): fix retrieving event rect position
Browse files Browse the repository at this point in the history
Legacy IE, x & y prop values aren't available from .getBoundingClientRect().
Use left & top prop instead.

Fix #1670
  • Loading branch information
netil committed Sep 11, 2020
1 parent 781fb61 commit 6fc449e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChartInternal/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export default {
const e = inputType === "touch" && event.changedTouches ? event.changedTouches[0] : event;
const index = findIndex(
coords,
isRotated ? e.clientY - rect.y : e.clientX - rect.x,
isRotated ? e.clientY - rect.top : e.clientX - rect.left,
0,
coords.length - 1,
isRotated
Expand Down

0 comments on commit 6fc449e

Please sign in to comment.