Fixed how the trashcan handled shadow blocks. (#2545)

This commit is contained in:
Beka Westberg
2019-06-05 09:53:56 -07:00
committed by RoboErikG
parent 54eb726063
commit 985bf3af3b

View File

@@ -470,7 +470,8 @@ Blockly.Trashcan.prototype.onDelete_ = function() {
if (trashcan.workspace_.options.maxTrashcanContents <= 0) {
return;
}
if (event.type == Blockly.Events.BLOCK_DELETE) {
if (event.type == Blockly.Events.BLOCK_DELETE &&
event.oldXml.tagName.toLowerCase() != 'shadow') {
var cleanedXML = trashcan.cleanBlockXML_(event.oldXml);
if (trashcan.contents_.indexOf(cleanedXML) != -1) {
return;