Revert "feat!: allow blocks to receive their own delete events" (#6676)

This commit is contained in:
Beka Westberg
2022-12-01 14:55:31 -08:00
committed by GitHub
parent 089841c26f
commit 67275e4bba
5 changed files with 8 additions and 66 deletions

View File

@@ -324,16 +324,15 @@ export class Block implements IASTNodeLocation, IDeletable {
if (this.isDeadOrDying()) {
return;
}
// Terminate onchange event calls.
if (this.onchangeWrapper_) {
this.workspace.removeChangeListener(this.onchangeWrapper_);
}
this.unplug(healStack);
if (eventUtils.isEnabled()) {
eventUtils.fire(new (eventUtils.get(eventUtils.BLOCK_DELETE))(this));
}
if (this.onchangeWrapper_) {
this.workspace.removeChangeListener(this.onchangeWrapper_);
}
eventUtils.disable();
try {