diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index ca64ee8df..0b43f000c 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -271,6 +271,17 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo result.domToMutation(oldMutationDom); } } + // Copy field values from the other block. These values may impact the + // rendered size of the insertion marker. Note that we do not care about + // child blocks here. + for (var i = 0; i < sourceBlock.inputList.length; i++) { + var input = sourceBlock.inputList[i]; + for (var j = 0; j < input.fieldRow.length; j++) { + var field = input.fieldRow[j]; + result.setFieldValue(field.getValue(), field.name); + } + } + result.initSvg(); result.getSvgRoot().setAttribute('visibility', 'hidden'); } finally {