mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
feat!: allow blocks to receive their own delete events (#6337)
* feat!: allow blocks to receive their own delete events * fix: move block tests back into main directory * chore: add a test for disposing of callers * chore: add test for delete being received * chore: add comment about why we have to run the clock twice * chore: fix whitespace * chore: fix whitespace * chore: fix imports in tests * chore: bump mocha timeout * chore: bump timeout again? * chore: eliminate the possibility that tests are actually timing out * chore: change timeout back * chore: remove tests that might be the problematic ones * chore: attempt enabling delete event test * chore: enable lists tests * chore: try ternary test as well * chore: actually add block test files * chore: enable remaining tests
This commit is contained in:
@@ -980,7 +980,7 @@ const PROCEDURE_CALL_COMMON = {
|
||||
Xml.domToWorkspace(xml, this.workspace);
|
||||
Events.setGroup(false);
|
||||
}
|
||||
} else if (event.type === Events.BLOCK_DELETE) {
|
||||
} else if (event.type === Events.BLOCK_DELETE && event.blockId != this.id) {
|
||||
// Look for the case where a procedure definition has been deleted,
|
||||
// leaving this block (a procedure call) orphaned. In this case, delete
|
||||
// the orphan.
|
||||
|
||||
Reference in New Issue
Block a user