mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 22:45:18 +02:00
Use moveEnd/Start in removeText
This commit is contained in:
@@ -231,10 +231,10 @@ function removeText(state, operation) {
|
||||
|
||||
// Update the selection
|
||||
if (startKey == node.key && startOffset >= rangeOffset) {
|
||||
selection = selection.extendStartOffset(-length)
|
||||
selection = selection.moveStartOffset(-length)
|
||||
}
|
||||
if (endKey == node.key && endOffset >= rangeOffset) {
|
||||
selection = selection.extendEndOffset(-length)
|
||||
selection = selection.moveEndOffset(-length)
|
||||
}
|
||||
|
||||
state = state.merge({ document, selection })
|
||||
|
Reference in New Issue
Block a user