diff --git a/core/block_dragger.js b/core/block_dragger.js index 0fed99b36..47624a335 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -162,9 +162,9 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY, this.draggingBlock_.bringToFront(); } - // // During a drag there may be a lot of rerenders, but not field changes. - // // Turn the cache on so we don't do spurious remeasures during the drag. - // Blockly.Field.startCache(); + // During a drag there may be a lot of rerenders, but not field changes. + // Turn the cache on so we don't do spurious remeasures during the drag. + Blockly.Field.startCache(); this.workspace_.setResizesEnabled(false); Blockly.BlockAnimations.disconnectUiStop(); diff --git a/core/block_render_svg.js b/core/block_render_svg.js index c12903211..a1d4af37e 100644 --- a/core/block_render_svg.js +++ b/core/block_render_svg.js @@ -391,8 +391,6 @@ Blockly.BlockSvg.prototype.renderFields_ = function(fieldList, root.setAttribute('display', 'none'); } } - - return this.RTL ? -cursorX : cursorX; }; diff --git a/core/connection.js b/core/connection.js index bff427814..1f97d81fe 100644 --- a/core/connection.js +++ b/core/connection.js @@ -431,6 +431,16 @@ Blockly.Connection.prototype.isConnectionAllowed = function(candidate) { break; } case Blockly.NEXT_STATEMENT: { + // Don't let a block with no next connection bump other blocks out of the + // stack. But covering up a shadow block or stack of shadow blocks is + // fine. Similarly, replacing a terminal statement with another terminal + // statement is allowed. + if (candidate.isConnected() && + !this.sourceBlock_.nextConnection && + !candidate.targetBlock().isShadow() && + candidate.targetBlock().nextConnection) { + return false; + } break; } default: