fix: disposing during dragging (#6954)

(cherry picked from commit 2167afab85)
This commit is contained in:
Beka Westberg
2023-04-06 11:41:12 -07:00
parent d227ec2c89
commit 4271e1a4a7

View File

@@ -346,6 +346,7 @@ export class BlockDragger implements IBlockDragger {
/** Fire a move event at the end of a block drag. */
protected fireMoveEvent_() {
if (this.draggingBlock_.isDeadOrDying()) return;
const event = new (eventUtils.get(eventUtils.BLOCK_MOVE))(
this.draggingBlock_) as BlockMove;
event.oldCoordinate = this.startXY_;