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 83c6cb4 commit 0758381Copy full SHA for 0758381
1 file changed
main/blocklyinit.js
@@ -761,12 +761,19 @@ export function createBlocklyWorkspace() {
761
});
762
if (!match) return false;
763
764
+ const focusManager = Blockly.getFocusManager?.();
765
+ const currentlySelected = toolbox.getSelectedItem?.();
766
+ if (currentlySelected === match) {
767
+ focusManager?.focusTree?.(toolbox);
768
+ focusManager?.focusNode?.(match);
769
+ return true;
770
+ }
771
+
772
expandCategoryBranch(match);
773
toolbox.setSelectedItem?.(match);
774
const selectedItem = toolbox.getSelectedItem?.();
775
if (selectedItem !== match) return false;
776
- const focusManager = Blockly.getFocusManager?.();
777
focusManager?.focusTree?.(toolbox);
778
const isSelectable =
779
typeof selectedItem.isSelectable === "function"
0 commit comments