Make flyouts hide the parent workspace's scrollbars

This commit is contained in:
Evan W. Patton
2017-05-15 18:04:50 -04:00
parent aa9276bd34
commit 824b2cae18

View File

@@ -721,6 +721,7 @@ Blockly.Flyout.prototype.hide = function() {
if (!this.isVisible()) {
return;
}
Blockly.mainWorkspace.scrollbar.setContainerVisible(true);
this.setVisible(false);
// Delete all the event listeners.
for (var x = 0, listen; listen = this.listeners_[x]; x++) {
@@ -741,6 +742,7 @@ Blockly.Flyout.prototype.hide = function() {
* Variables and procedures have a custom set of blocks.
*/
Blockly.Flyout.prototype.show = function(xmlList) {
Blockly.mainWorkspace.scrollbar.setContainerVisible(false); // hide parent's scrollbars
this.workspace_.setResizesEnabled(false);
this.hide();
this.clearOldBlocks_();