From 962fcd5c2edcbc623d33f9f2c34aec853198a366 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Tue, 21 Aug 2018 12:51:43 -0700 Subject: [PATCH] Fix #1959 by calling bring to front when a block drag starts inside a mutator. (#2013) --- core/block_dragger.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/block_dragger.js b/core/block_dragger.js index 9a6c46573..fa9bbcafd 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -152,6 +152,13 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY, hea Blockly.Events.setGroup(true); } + // Mutators don't have the same type of z-ordering as the normal workspace during a drag. + // They have to rely on the order of the blocks in the svg. For performance reasons that + // usually happens at the end of a drag, but do it at the beginning for mutators. + if (this.workspace_.isMutator) { + this.draggingBlock_.bringToFront(); + } + this.workspace_.setResizesEnabled(false); Blockly.BlockAnimations.disconnectUiStop();