Skip to content

Commit 2681a9c

Browse files
committed
Fixed off-by-one when moving nodes by keyboard
1 parent 55ea485 commit 2681a9c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/he-tree-vue/src/components/DraggableTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ const cpt = defineComponent({
229229
}
230230
case "ArrowDown": {
231231
if (siblingIndex < siblings.length - 1) {
232-
this.move(stat, stat.parent || null, siblingIndex + 2);
232+
this.move(stat, stat.parent || null, siblingIndex + 1);
233233
this.$emit("change");
234234
const newSiblings = stat.parent
235235
? stat.parent.children

0 commit comments

Comments
 (0)