fix: clear dropdown div before rendering content (#5429)

This commit is contained in:
hpnrep6
2021-10-14 12:43:12 -04:00
committed by GitHub
parent 246927a7ee
commit abee92c7c9

View File

@@ -315,6 +315,9 @@ FieldDropdown.prototype.showEditor_ = function(opt_e) {
} else {
this.menu_.openingCoords = null;
}
// Remove any pre-existing elements in the dropdown.
Blockly.DropDownDiv.clearContent();
// Element gets created in render.
this.menu_.render(DropDownDiv.getContentDiv());
const menuElement = /** @type {!Element} */ (this.menu_.getElement());