diff --git a/core/block.js b/core/block.js index 09fde8a27..3c2268fa9 100644 --- a/core/block.js +++ b/core/block.js @@ -1232,8 +1232,15 @@ Blockly.Block.prototype.removeInput = function(name, opt_quiet) { for (var i = 0, input; input = this.inputList[i]; i++) { if (input.name == name) { if (input.connection && input.connection.targetConnection) { - // Disconnect any attached block. - input.connection.targetBlock().unplug(); + input.connection.setShadowDom(null); + var block = input.connection.targetBlock(); + if (block.isShadow()) { + // Destroy any attached shadow block. + block.dispose(); + } else { + // Disconnect any attached normal block. + block.unplug(); + } } input.dispose(); this.inputList.splice(i, 1); diff --git a/core/block_svg.js b/core/block_svg.js index fd71732c8..04d59cc5d 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -499,7 +499,7 @@ Blockly.BlockSvg.prototype.onMouseDown_ = function(e) { // Right-click. this.showContextMenu_(e); } else if (!this.isMovable()) { - // Allow unmovable blocks to be selected and context menued, but not + // Allow immovable blocks to be selected and context menued, but not // dragged. Let this event bubble up to document, so the workspace may be // dragged instead. return;