1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 00:27:28 +02:00

Make use of clientX and clientY in getEventRange (#2675)

Fixes #2570
This commit is contained in:
Arek Mytych
2019-04-02 15:24:38 +02:00
committed by Ian Storm Taylor
parent c688ad7c72
commit 594e891c32

View File

@@ -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