From 7a4470f4861d5be9d38772f1be36475556c2eca3 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 17 Nov 2020 11:44:55 -0800 Subject: [PATCH] Add mutator bump back in (#4450) --- core/mutator.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/mutator.js b/core/mutator.js index c630238f9..093a01df6 100644 --- a/core/mutator.js +++ b/core/mutator.js @@ -428,6 +428,13 @@ Blockly.Mutator.prototype.workspaceChanged_ = function(e) { if (oldMutation != newMutation) { Blockly.Events.fire(new Blockly.Events.BlockChange( block, 'mutation', null, oldMutation, newMutation)); + // Ensure that any bump is part of this mutation's event group. + var group = Blockly.Events.getGroup(); + setTimeout(function() { + Blockly.Events.setGroup(group); + block.bumpNeighbours(); + Blockly.Events.setGroup(false); + }, Blockly.BUMP_DELAY); } // Don't update the bubble until the drag has ended, to avoid moving blocks