From 5609cda70f5efffe0b61ef2876fe65e31a965823 Mon Sep 17 00:00:00 2001 From: Monica Kozbial Date: Fri, 20 Sep 2019 15:35:46 -0700 Subject: [PATCH] Copying values to insertion marker fields directly. (#3063) --- core/insertion_marker_manager.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index a40b3b7ba..eabcf296e 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -273,10 +273,12 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo // 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); + var sourceInput = sourceBlock.inputList[i]; + var resultInput = result.inputList[i]; + for (var j = 0; j < sourceInput.fieldRow.length; j++) { + var sourceField = sourceInput.fieldRow[j]; + var resultField = resultInput.fieldRow[j]; + resultField.setValue(sourceField.getValue()); } }