Fixed buttons being rendered as labels if they come after a label. (#2410)

This commit is contained in:
Beka Westberg
2019-04-25 18:21:42 -07:00
committed by RoboErikG
parent c438188ab1
commit 79d75b9f3d

View File

@@ -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});