mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-25 00:06:30 +02:00
Fix deleteCharBackwardAtRange
When we have nested inlines in startBlock, startOffset will point to the wrong character. So, i think that using startText will be correct here.
This commit is contained in:
committed by
GitHub
parent
e1b7a71583
commit
e4589a04ab
@@ -131,8 +131,8 @@ export function deleteAtRange(transform, range, options = {}) {
|
||||
|
||||
export function deleteCharBackwardAtRange(transform, range, options) {
|
||||
const { state } = transform
|
||||
const { startOffset, startBlock } = state
|
||||
const { text } = startBlock
|
||||
const { startOffset, startText } = state
|
||||
const { text } = startText
|
||||
const n = String.getCharOffsetBackward(text, startOffset)
|
||||
transform.deleteBackwardAtRange(range, n, options)
|
||||
}
|
||||
|
Reference in New Issue
Block a user