From f6b9deab4d67163d44fa27792a38be424a7cddb2 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 14 Jan 2020 09:45:02 -0800 Subject: [PATCH] Moves setCollapsed to after mutation (#3591) --- core/insertion_marker_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index dc4246ba7..92860e643 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -248,13 +248,13 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo try { var result = this.workspace_.newBlock(imType); result.setInsertionMarker(true); - result.setCollapsed(sourceBlock.isCollapsed()); if (sourceBlock.mutationToDom) { var oldMutationDom = sourceBlock.mutationToDom(); if (oldMutationDom) { result.domToMutation(oldMutationDom); } } + result.setCollapsed(sourceBlock.isCollapsed()); // 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.