From f7dd9623095f74f6bb4c929c9d7decd458a1c354 Mon Sep 17 00:00:00 2001 From: matthewlipski Date: Mon, 25 Nov 2024 18:02:55 +0100 Subject: [PATCH] Revert "Fixed bug where moving blocks across a `columnList` using Cmd+ArrowUp/ArrowDown wouldn't work" This reverts commit 8c4ddd3821aa3a66985d2f3a28ff32830f497ede. --- .../commands/moveBlock/moveBlock.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/core/src/api/blockManipulation/commands/moveBlock/moveBlock.ts b/packages/core/src/api/blockManipulation/commands/moveBlock/moveBlock.ts index 806322c83..13bea01c6 100644 --- a/packages/core/src/api/blockManipulation/commands/moveBlock/moveBlock.ts +++ b/packages/core/src/api/blockManipulation/commands/moveBlock/moveBlock.ts @@ -125,11 +125,7 @@ export function moveBlockUp(editor: BlockNoteEditor) { referenceBlockId = parentBlock.id; placement = "before"; } - } else if ( - prevBlock.type !== "columnList" && - prevBlock.type !== "column" && - prevBlock.children.length > 0 - ) { + } else if (prevBlock.children.length > 0) { referenceBlockId = prevBlock.children[prevBlock.children.length - 1].id; placement = "after"; } else { @@ -156,11 +152,7 @@ export function moveBlockDown(editor: BlockNoteEditor) { referenceBlockId = parentBlock.id; placement = "after"; } - } else if ( - nextBlock.type !== "columnList" && - nextBlock.type !== "column" && - nextBlock.children.length > 0 - ) { + } else if (nextBlock.children.length > 0) { referenceBlockId = nextBlock.children[0].id; placement = "before"; } else {