From 627c521c2971ebdaba1e3636bf2672394fc92107 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Sat, 9 Feb 2019 13:08:38 -0800 Subject: [PATCH] Fixed flyout scrollbars not being repositioned on window resize. --- core/flyout_base.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/flyout_base.js b/core/flyout_base.js index 685f5ad10..f1ad80f97 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -388,6 +388,10 @@ Blockly.Flyout.prototype.positionAt_ = function(width, height, x, y) { // Set the scrollbars origin to be the top left of the flyout. this.scrollbar_.setOrigin(x, y); this.scrollbar_.resize(); + // Set the position again so that if the metrics were the same (and the + // resize failed) our position is still updated. + this.scrollbar_.setPosition_( + this.scrollbar_.position_.x, this.scrollbar_.position_.y); } };