From f8d38d77b67897b0040c7a6e5fa97cc0c41a1099 Mon Sep 17 00:00:00 2001 From: sheitabrk <44614193+sheitabrk@users.noreply.github.com> Date: Tue, 19 May 2026 02:08:11 +0200 Subject: [PATCH] fix(blocks): use static tooltip for controls_ifelse block The controls_ifelse block was using the controls_if_tooltip dynamic extension, which reads this.elseifCount_ and this.elseCount_ set by the controls_if_mutator. Since controls_ifelse has no mutator, both counts are undefined and the extension always returned TOOLTIP_1 (for a simple if), instead of TOOLTIP_2 (for if/else). The static tooltip already declared on the block was unreachable because of a typo (BKYCONTROLS_IF_TOOLTIP_2 was missing the underscore after BKY) and would have been overridden by the extension anyway. Fix the message key typo and drop the extension so the static TOOLTIP_2 string is displayed instead. Fixes #9813 Signed-off-by: sheitabrk <44614193+sheitabrk@users.noreply.github.com> --- packages/blockly/blocks/logic.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/blockly/blocks/logic.ts b/packages/blockly/blocks/logic.ts index cf9a90a788b..5fb1ef36acb 100644 --- a/packages/blockly/blocks/logic.ts +++ b/packages/blockly/blocks/logic.ts @@ -100,10 +100,9 @@ export const blocks = createBlockDefinitionsFromJsonArray([ 'previousStatement': null, 'nextStatement': null, 'style': 'logic_blocks', - 'tooltip': '%{BKYCONTROLS_IF_TOOLTIP_2}', + 'tooltip': '%{BKY_CONTROLS_IF_TOOLTIP_2}', 'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}', 'suppressPrefixSuffix': true, - 'extensions': ['controls_if_tooltip'], }, // Block for comparison operator. {