1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 18:39:51 +02:00

Update find-point.js (#1373)

This commit is contained in:
joehua87
2017-11-12 06:50:53 +07:00
committed by Ian Storm Taylor
parent 9a5d97e6d1
commit 0a5bfd2adc

View File

@@ -52,6 +52,7 @@ function findPoint(nativeNode, nativeOffset, value) {
const voidNode = parentNode.closest(VOID_SELECTOR)
if (!voidNode) return null
rangeNode = voidNode.querySelector(RANGE_SELECTOR)
if (!rangeNode) return null
node = rangeNode
offset = node.textContent.length
}