fix: Fix bug that could cause focus to be lost when deleting a block (#9779)

This commit is contained in:
Aaron Dodson
2026-04-30 13:20:54 -07:00
committed by GitHub
parent b714ef7fd6
commit 0bea583e55
+8 -8
View File
@@ -918,6 +918,14 @@ export class BlockSvg
Tooltip.dispose();
ContextMenu.hide();
if (animate) {
this.unplug(healStack);
blockAnimations.disposeUiEffect(this);
}
super.dispose(!!healStack);
dom.removeNode(this.svgGroup);
// If this block (or a descendant) was focused, focus its parent or
// workspace instead.
const focusManager = getFocusManager();
@@ -956,14 +964,6 @@ export class BlockSvg
}
}
}
if (animate) {
this.unplug(healStack);
blockAnimations.disposeUiEffect(this);
}
super.dispose(!!healStack);
dom.removeNode(this.svgGroup);
}
/**