From 985bf3af3b1acb2372a1c8e2d019cbd90193d7fa Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 5 Jun 2019 09:53:56 -0700 Subject: [PATCH] Fixed how the trashcan handled shadow blocks. (#2545) --- core/trashcan.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/trashcan.js b/core/trashcan.js index ccee525bc..2eb5cc8b6 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -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;