mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 17:39:57 +02:00
fix logic for empty blocks
This commit is contained in:
@@ -323,7 +323,8 @@ export function splitBlock(transform, depth = 1) {
|
||||
// block, the starting text node won't need to be split.
|
||||
if (
|
||||
(startOffset == 0) &&
|
||||
(startText == startInline || startInline.getOffset(startText.key) == 0)
|
||||
(startBlock.text != '') &&
|
||||
(!startInline || startInline.getOffset(startText.key) == 0)
|
||||
) {
|
||||
after = selection.collapseToStartOf(startText)
|
||||
}
|
||||
|
Reference in New Issue
Block a user