diff --git a/core/connection.js b/core/connection.js index 1728576a6..d245c3548 100644 --- a/core/connection.js +++ b/core/connection.js @@ -180,8 +180,9 @@ Blockly.Connection.prototype.connect_ = function(childConnection) { // block. Since this block may be a stack, walk down to the end. var newBlock = childBlock; while (newBlock.nextConnection) { - if (newBlock.nextConnection.isConnected()) { - newBlock = newBlock.getNextBlock(); + var nextBlock = newBlock.getNextBlock(); + if (nextBlock && !nextBlock.isShadow()) { + newBlock = nextBlock; } else { if (orphanBlock.previousConnection.checkType_( newBlock.nextConnection)) { diff --git a/tests/multi_playground.html b/tests/multi_playground.html index c25d7a543..f541d6f6b 100644 --- a/tests/multi_playground.html +++ b/tests/multi_playground.html @@ -161,7 +161,7 @@ h1 {