mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Fixed how the trashcan handled shadow blocks. (#2545)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user