Fixed flyout scrollbars not being repositioned on window resize.

This commit is contained in:
Beka Westberg
2019-02-09 13:08:38 -08:00
parent b015d67f24
commit 627c521c29

View File

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