Skip to content

Commit

Permalink
fix: clear dropdown div before rendering content (google#5429)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpnrep6 authored Oct 14, 2021
1 parent 246927a commit abee92c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/field_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit abee92c

Please sign in to comment.