From 048e77dc9aadbb0d2912f6ff3d9145cf55dc784c Mon Sep 17 00:00:00 2001 From: hpnrep6 Date: Mon, 12 Jul 2021 01:26:03 -0400 Subject: [PATCH] Include button heights in flyout height calculation --- core/flyout_horizontal.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/flyout_horizontal.js b/core/flyout_horizontal.js index b01a84437..485d29617 100644 --- a/core/flyout_horizontal.js +++ b/core/flyout_horizontal.js @@ -343,6 +343,10 @@ Blockly.HorizontalFlyout.prototype.reflowInternal_ = function() { for (var i = 0, block; (block = blocks[i]); i++) { flyoutHeight = Math.max(flyoutHeight, block.getHeightWidth().height); } + var buttons = this.buttons_; + for (var i = 0, button; (button = buttons[i]); i++) { + flyoutHeight = Math.max(flyoutHeight, button.height); + } flyoutHeight += this.MARGIN * 1.5; flyoutHeight *= this.workspace_.scale; flyoutHeight += Blockly.Scrollbar.scrollbarThickness;