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 Paul Kaplan
parent b033c8d3ab
commit 9ce71d1099

View file

@ -620,8 +620,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;