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

moving over weird ghost text node if keys are the same (#1131)

This commit is contained in:
Ryan Yurkanin
2017-09-18 14:20:30 -04:00
committed by Ian Storm Taylor
parent fd7981782c
commit ca4075eb47

View File

@@ -762,7 +762,7 @@ class Node {
}
// Get the start and end nodes.
const next = node.getNextText(startKey)
const next = node.getNextText(node.getNextText(startKey).key)
const startNode = node.getNextSibling(node.getFurthestAncestor(startKey).key)
const endNode = startKey == endKey
? node.getFurthestAncestor(next.key)