From 13fcc350de088cded18cae04c46369106c5d7552 Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Tue, 15 Oct 2024 13:35:33 -0700 Subject: [PATCH] add comment --- pxtblocks/plugins/functions/blocks/functionDeclarationBlock.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pxtblocks/plugins/functions/blocks/functionDeclarationBlock.ts b/pxtblocks/plugins/functions/blocks/functionDeclarationBlock.ts index 7de7bf8e372..0ad252c3798 100644 --- a/pxtblocks/plugins/functions/blocks/functionDeclarationBlock.ts +++ b/pxtblocks/plugins/functions/blocks/functionDeclarationBlock.ts @@ -93,6 +93,9 @@ const FUNCTION_DECLARATION_MIXIN: FunctionDeclarationMixin = { }, async focusLastEditorAsync_(this: FunctionDeclarationBlock) { + // The argument editor block might still be rendering. + // Wait for the render queue to finish so that the centerOnBlock + // function is able to correctly position the editor scroll. await Blockly.renderManagement.finishQueuedRenders(); if (this.inputList.length > 0) {