diff --git a/core/flyout_button.js b/core/flyout_button.js index 965ce8ef3..a0280a584 100644 --- a/core/flyout_button.js +++ b/core/flyout_button.js @@ -155,11 +155,11 @@ Blockly.FlyoutButton.prototype.createDom = function() { this.svgGroup_); svgText.textContent = this.text_; - this.width = svgText.getComputedTextLength() + - 2 * Blockly.FlyoutButton.MARGIN; + this.width = svgText.getComputedTextLength(); this.height = 20; // Can't compute it :( if (!this.isLabel_) { + this.width += 2 * Blockly.FlyoutButton.MARGIN; shadow.setAttribute('width', this.width); shadow.setAttribute('height', this.height); }