From 3e1e9b5ddc8ca92548351dc9e6eadec98c3cc831 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 8 Apr 2024 16:44:31 +0000 Subject: [PATCH] fix: blocks not being returned to the correct layer if their drag is reverted with no parent (#7998) * fix: blocks not being returned to the correct drag layer if their drag is reverted with no parent * fix: delete test code --- core/dragging/block_drag_strategy.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/dragging/block_drag_strategy.ts b/core/dragging/block_drag_strategy.ts index d3f348e8f..fadba28fb 100644 --- a/core/dragging/block_drag_strategy.ts +++ b/core/dragging/block_drag_strategy.ts @@ -429,6 +429,9 @@ export class BlockDragStrategy implements IDragStrategy { } } else { this.block.moveTo(this.startLoc!, ['drag']); + this.workspace + .getLayerManager() + ?.moveOffDragLayer(this.block, layers.BLOCK); // Blocks dragged directly from a flyout may need to be bumped into // bounds. bumpObjects.bumpIntoBounds(