diff --git a/core/block_dragger.js b/core/block_dragger.js index ce9c51e75..21e3994c9 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -224,9 +224,9 @@ Blockly.BlockDragger.prototype.endBlockDrag = function(e, currentDragDeltaXY) { // These are expensive and don't need to be done if we're deleting. this.draggingBlock_.moveConnections_(delta.x, delta.y); this.draggingBlock_.setDragging(false); + this.fireMoveEvent_(); this.draggedConnectionManager_.applyConnections(); this.draggingBlock_.render(); - this.fireMoveEvent_(); this.draggingBlock_.scheduleSnapAndBump(); } this.workspace_.setResizesEnabled(true); diff --git a/core/block_svg.js b/core/block_svg.js index a073aacf0..2a639d0e8 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -279,12 +279,8 @@ Blockly.BlockSvg.prototype.setParent = function(newParent) { // If we are losing a parent, we want to move our DOM element to the // root of the workspace. else if (oldParent) { - // Avoid moving a block up the DOM if it's currently selected/dragging, - // so as to avoid taking things off the drag surface. - if (Blockly.selected != this) { - this.workspace.getCanvas().appendChild(svgRoot); - this.translate(oldXY.x, oldXY.y); - } + this.workspace.getCanvas().appendChild(svgRoot); + this.translate(oldXY.x, oldXY.y); } };