From 594e891c327abb0cdd53a4b909a45a8658f44d0d Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Tue, 2 Apr 2019 15:24:38 +0200 Subject: [PATCH] Make use of clientX and clientY in getEventRange (#2675) Fixes #2570 --- packages/slate-react/src/utils/get-event-range.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slate-react/src/utils/get-event-range.js b/packages/slate-react/src/utils/get-event-range.js index db788c6a9..61ce8dbd7 100644 --- a/packages/slate-react/src/utils/get-event-range.js +++ b/packages/slate-react/src/utils/get-event-range.js @@ -23,7 +23,7 @@ function getEventRange(event, editor) { event = event.nativeEvent } - const { x, y, target } = event + const { clientX: x, clientY: y, target } = event if (x == null || y == null) return null const { value } = editor