From 6e3a2b721881548062a6fc13439f3d04d3e7817e Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Tue, 5 Sep 2017 10:26:58 -0700 Subject: [PATCH] Fix flyout labels causing flyout scrolling issues (#1301) --- core/flyout_base.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/flyout_base.js b/core/flyout_base.js index 0672c757c..c99a02208 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -530,8 +530,9 @@ Blockly.Flyout.prototype.clearOldBlocks_ = function() { } } // Delete any background buttons from a previous showing. - for (var j = 0, rect; rect = this.backgroundButtons_[j]; j++) { - goog.dom.removeNode(rect); + for (var j = 0; j < this.backgroundButtons_.length; j++) { + var rect = this.backgroundButtons_[j]; + if (rect) goog.dom.removeNode(rect); } this.backgroundButtons_.length = 0;