From f26e8f8e2f98468b0ec23247ab47c5316afcba8d Mon Sep 17 00:00:00 2001 From: Michael Gallagher Date: Wed, 17 Sep 2025 12:35:41 -0700 Subject: [PATCH 1/2] Change BlockSvg.select to Blockly.common.setSelected https://github.com/google/blockly/pull/7991 --- block-lexical-variables/src/blocks/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-lexical-variables/src/blocks/procedures.js b/block-lexical-variables/src/blocks/procedures.js index 1819368..fe7e693 100644 --- a/block-lexical-variables/src/blocks/procedures.js +++ b/block-lexical-variables/src/blocks/procedures.js @@ -948,7 +948,7 @@ Blockly.Blocks['procedures_callnoreturn'] = { option.callback = function() { const def = Blockly.Procedures.getDefinition(name, workspace); if (def) { - def.select(); + Blockly.common.setSelected(def); workspace.centerOnBlock(def.id); workspace.getParentSvg().parentElement.focus(); } From 8530669123f38a5a908a88f7db0c8854e3079291 Mon Sep 17 00:00:00 2001 From: Michael Gallagher Date: Wed, 17 Sep 2025 14:06:12 -0700 Subject: [PATCH 2/2] Enable Highlight Procedure --- block-lexical-variables/src/blocks/procedures.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block-lexical-variables/src/blocks/procedures.js b/block-lexical-variables/src/blocks/procedures.js index fe7e693..21d7a83 100644 --- a/block-lexical-variables/src/blocks/procedures.js +++ b/block-lexical-variables/src/blocks/procedures.js @@ -939,7 +939,7 @@ Blockly.Blocks['procedures_callnoreturn'] = { } } }, - procCustomContextMenu: function(options) { + customContextMenu: function(options) { // Add option to find caller. const option = {enabled: true}; option.text = Blockly.Msg['LANG_PROCEDURES_HIGHLIGHT_DEF']; @@ -1013,8 +1013,8 @@ Blockly.Blocks['procedures_callreturn'] = { mutationToDom: Blockly.Blocks.procedures_callnoreturn.mutationToDom, domToMutation: Blockly.Blocks.procedures_callnoreturn.domToMutation, renameVar: Blockly.Blocks.procedures_callnoreturn.renameVar, - procCustomContextMenu: - Blockly.Blocks.procedures_callnoreturn.procCustomContextMenu, + customContextMenu: + Blockly.Blocks.procedures_callnoreturn.customContextMenu, removeProcedureValue: Blockly.Blocks.procedures_callnoreturn.removeProcedureValue, };