We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd03e9 commit 7d86ae3Copy full SHA for 7d86ae3
src/navigation.ts
@@ -403,9 +403,11 @@ export class Navigation {
403
if (cursor) {
404
const passiveFocusNode = this.passiveFocusIndicator.getCurNode();
405
this.passiveFocusIndicator.hide();
406
- // If there's a gesture then it will either set the node or be a click
+ const disposed = passiveFocusNode?.getSourceBlock()?.disposed;
407
+ // If there's a gesture then it will either set the node if it has not
408
+ // been disposed (which can happen when blocks are reloaded) or be a click
409
// that should not set one.
- if (!Blockly.Gesture.inProgress() && passiveFocusNode) {
410
+ if (!Blockly.Gesture.inProgress() && passiveFocusNode && !disposed) {
411
cursor.setCurNode(passiveFocusNode);
412
}
413
0 commit comments