Closed koenvanwijk closed 6 months ago
It's interesting to see you integrate Blockly into VSCode somehow. We can add a configuration to disable the workspace auto-focus, as it looks like it's the only feasible way to fix it here. That feature was designed to remove the need to click (focus) the workspace for multi-selection when we have multiple workspaces (#19), so it can be more straightforward to switch between workspaces, so it shouldn't break something when you only have one workspace.
The fix will be landed in v0.1.12: https://github.com/HollowMan6/workspace-multiselect/commit/743d1d43f45fd2e9ae8c497a93875f1a48c05ac8
Note that if you get the workspace autofocus disabled and still want to get the workspace focused after the page load, you can try this code: https://github.com/mit-cml/workspace-multiselect/pull/19/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L61-L64
Sounds like a good solution, thanks for the quick fix!
The following code claims focus when the mouse enters the workspace div:
As shown some exceptions are made on 'input' and 'textarea' however in my case another node type that is closed due to the change of focus.
What functionality will break when this code is removed? It is probably not a good idea to extend the list of exceptions...
As shown in the video below a vscode menu is closed as the focus is set to the workspace div when I enter the div.
https://github.com/mit-cml/workspace-multiselect/assets/8227977/9c3eb76d-95e5-4cd6-99f9-85966a81ff2e