From 79d75b9f3d9f624a64e49da8de8fab1b9da8e706 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 25 Apr 2019 18:21:42 -0700 Subject: [PATCH] Fixed buttons being rendered as labels if they come after a label. (#2410) --- core/flyout_base.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/flyout_base.js b/core/flyout_base.js index 41e0501ae..ab77802f9 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -480,10 +480,8 @@ Blockly.Flyout.prototype.show = function(xmlList) { } break; case 'LABEL': - // Labels behave the same as buttons, but are styled differently. - var isLabel = true; - // Falls through. case 'BUTTON': + var isLabel = xml.tagName.toUpperCase() == 'LABEL'; var curButton = new Blockly.FlyoutButton(this.workspace_, this.targetWorkspace_, xml, isLabel); contents.push({type: 'button', button: curButton});