You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@maribethb@lizschwab , I looked into this. The minimap triggers it, but the root cause is a bug in core.
TLDR;
Root cause
Its this part of the code in WidgetDiv.ts in function hideIfOwnerIsInWorkspace
on line 262: let currentWorkspace = workspace;
and then on 264: if (currentWorkspace === workspace) { which will always evaluate to true. :)
FIx
We should set the let currentWorkspace = ownerWorkspace;
and walk up the tree to parents currentWorkspace = currentWorkspace.options.parentWorkspace;
Long Explanation follows
Everytime a text editor is opened on a workspace, it lives in a shared container (WidgetDiv).
whenever we edit a number in a block and press tab and if the minimap is open - it tries to replicate this change
it does a zoomTofit() -> hideChaff() to close any open widgets etc.
The problem is, it inadvertently closes the main workspace widget. We should correctly check the ownership before closing, this ownership check is broken currently.
If my explanation seems reasonable, can I open a PR for this ?
You're always welcome to open a PR against Blockly, so please feel free to do so. I haven't looked too deeply into the code, but I don't see any immediate issues with your approach.
Activity
ritfiz commentedon Oct 24, 2026
@maribethb @lizschwab , I looked into this. The minimap triggers it, but the root cause is a bug in core.
TLDR;
Root cause
Its this part of the code in WidgetDiv.ts in function
hideIfOwnerIsInWorkspaceon line 262:
let currentWorkspace = workspace;and then on 264:
if (currentWorkspace === workspace) {which will always evaluate to true. :)FIx
We should set the
let currentWorkspace = ownerWorkspace;and walk up the tree to parents
currentWorkspace = currentWorkspace.options.parentWorkspace;Long Explanation follows
Everytime a text editor is opened on a workspace, it lives in a shared container (WidgetDiv).
whenever we edit a number in a block and press tab and if the minimap is open - it tries to replicate this change
it does a
zoomTofit()->hideChaff()to close any open widgets etc.The problem is, it inadvertently closes the main workspace widget. We should correctly check the ownership before closing, this ownership check is broken currently.
If my explanation seems reasonable, can I open a PR for this ?
lizschwab commentedon Oct 26, 2026
Hi Rituraj,
You're always welcome to open a PR against Blockly, so please feel free to do so. I haven't looked too deeply into the code, but I don't see any immediate issues with your approach.
ritfiz commentedon Oct 26, 2026
Thank you. I have opened a PR (#10633) for the same and added tests.