From 3a4adb3b0d8ce53da9242e5add090579b06f42d4 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Thu, 5 Apr 2018 17:57:47 -0700 Subject: [PATCH] Scroll to the procedure definition from the procedure call context menu --- blocks/procedures.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blocks/procedures.js b/blocks/procedures.js index b026be0f7..e166e9c5c 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -860,7 +860,10 @@ Blockly.Blocks['procedures_callnoreturn'] = { var workspace = this.workspace; option.callback = function() { var def = Blockly.Procedures.getDefinition(name, workspace); - def && def.select(); + if (def) { + workspace.centerOnBlock(def.id); + def.select(); + } }; options.push(option); },