Skip to content

Commit 42e5483

Browse files
Fixed add block button behaviour on blocks with different content (#526)
1 parent 877c4f0 commit 42e5483

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/extensions/SideMenu/SideMenuPlugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,10 @@ export class SideMenuView<
550550
const { contentNode, startPos, endPos } = blockInfo;
551551

552552
// Creates a new block if current one is not empty for the suggestion menu to open in.
553-
if (contentNode.textContent.length !== 0) {
553+
if (
554+
contentNode.type.spec.content !== "inline*" ||
555+
contentNode.textContent.length !== 0
556+
) {
554557
const newBlockInsertionPos = endPos + 1;
555558
const newBlockContentPos = newBlockInsertionPos + 2;
556559

0 commit comments

Comments
 (0)