We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6229dcf commit 4ba74b6Copy full SHA for 4ba74b6
packages/core/src/extensions/Blocks/nodes/BlockContainer.ts
@@ -552,12 +552,14 @@ export const BlockContainer = Node.create<{
552
state.selection.from
553
)!;
554
555
+ const selectionAtBlockStart =
556
+ state.selection.$anchor.parentOffset === 0;
557
const blockEmpty = node.textContent.length === 0;
558
559
if (!blockEmpty) {
560
chain()
561
.deleteSelection()
- .BNSplitBlock(state.selection.from, false)
562
+ .BNSplitBlock(state.selection.from, selectionAtBlockStart)
563
.run();
564
565
return true;
0 commit comments