Skip to content

Commit

Permalink
Revert "Fixed bug where moving blocks across a columnList using Cmd…
Browse files Browse the repository at this point in the history
…+ArrowUp/ArrowDown wouldn't work"

This reverts commit 8c4ddd3.
  • Loading branch information
matthewlipski committed Nov 25, 2024
1 parent 8c4ddd3 commit f7dd962
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ export function moveBlockUp(editor: BlockNoteEditor<any, any, any>) {
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 {
Expand All @@ -156,11 +152,7 @@ export function moveBlockDown(editor: BlockNoteEditor<any, any, any>) {
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 {
Expand Down

0 comments on commit f7dd962

Please sign in to comment.