Fix flyout labels causing flyout scrolling issues (#1301)

This commit is contained in:
Sam El-Husseini
2017-09-05 10:26:58 -07:00
committed by picklesrus
parent f34a2c2ed4
commit 6e3a2b7218

View File

@@ -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;