Skip to content
Merged
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions src/actions/mover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export class Mover {
if (!DraggerClass) throw new Error('no Dragger registered');
const dragger = new DraggerClass(block, workspace);
// Record that a move is in progress and start dragging.
workspace.setKeyboardMoveInProgress(true);
const info = new MoveInfo(block, dragger);
this.moves.set(workspace, info);
// Begin drag.
Expand Down Expand Up @@ -157,6 +158,7 @@ export class Mover {
this.unpatchWorkspace(workspace);
this.unpatchDragStrategy(info.block);
this.moves.delete(workspace);
workspace.setKeyboardMoveInProgress(false);
// Delay scroll until after block has finished moving.
setTimeout(() => this.scrollCurrentBlockIntoView(workspace), 0);
return true;
Expand Down Expand Up @@ -203,6 +205,7 @@ export class Mover {
this.unpatchWorkspace(workspace);
this.unpatchDragStrategy(info.block);
this.moves.delete(workspace);
workspace.setKeyboardMoveInProgress(false);
// Delay scroll until after block has finished moving.
setTimeout(() => this.scrollCurrentBlockIntoView(workspace), 0);
return true;
Expand Down
Loading