From abee92c7c996aeda138f3310aa474463c64490ba Mon Sep 17 00:00:00 2001 From: hpnrep6 Date: Thu, 14 Oct 2021 12:43:12 -0400 Subject: [PATCH] fix: clear dropdown div before rendering content (#5429) --- core/field_dropdown.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/field_dropdown.js b/core/field_dropdown.js index ea760d90b5b..569c8a91884 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -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());