Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions packages/blockly/core/dragging/block_drag_strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1023,12 +1023,14 @@ export class BlockDragStrategy implements IDragStrategy {
if (forwardTraversal) {
if (currentPairIndex === -1) {
const terminal = this.isInTerminalPosition(this.block, Direction.DOWN);
if (navigator.getNavigationLoops()) {
return this.pairToCandidate(pairs[0]);
} else if (!terminal) {
return this.getClosestCandidate(this.block, delta);
if (terminal) {
if (navigator.getNavigationLoops()) {
return this.pairToCandidate(pairs[0]);
} else {
return null;
}
}
return null;
return this.getClosestCandidate(this.block, delta);
} else if (currentPairIndex === pairs.length - 1) {
return null;
} else {
Expand All @@ -1037,12 +1039,14 @@ export class BlockDragStrategy implements IDragStrategy {
} else {
if (currentPairIndex === -1) {
const terminal = this.isInTerminalPosition(this.block, Direction.UP);
if (navigator.getNavigationLoops()) {
return this.pairToCandidate(pairs[pairs.length - 1]);
} else if (!terminal) {
return this.getClosestCandidate(this.block, delta);
if (terminal) {
if (navigator.getNavigationLoops()) {
return this.pairToCandidate(pairs[pairs.length - 1]);
} else {
return null;
}
}
return null;
return this.getClosestCandidate(this.block, delta);
} else if (currentPairIndex === 0) {
return null;
} else {
Expand Down
1 change: 0 additions & 1 deletion packages/blockly/tests/mocha/keyboard_movement_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,6 @@ suite('Keyboard-driven movement', function () {

Blockly.getFocusManager().focusNode(loop);
startMove(this.workspace);
moveRight(this.workspace);
this.clock.tick(10);

this.moveAndAssert(
Expand Down
Loading