From f942736a1e83f3e05827e53023b972fc5fb2e13e Mon Sep 17 00:00:00 2001 From: Monica Kozbial Date: Tue, 23 Feb 2021 14:35:21 -0800 Subject: [PATCH] Erratic scroll fix (#4650) * Resize fix * Update fix --- core/workspace_svg.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index fda7eeba7..7cf51e85f 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1726,7 +1726,11 @@ Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox = function() { // Start at 1 since the 0th block was used for initialization. for (var i = 1; i < topElements.length; i++) { - var blockBoundary = topElements[i].getBoundingRectangle(); + var topElement = topElements[i]; + if (topElement.isInsertionMarker && topElement.isInsertionMarker()) { + continue; + } + var blockBoundary = topElement.getBoundingRectangle(); if (blockBoundary.top < boundary.top) { boundary.top = blockBoundary.top; }