Revert not closing the flyout for a tree separator (#3944)

This commit is contained in:
alschmiedt
2020-06-09 10:27:06 -07:00
committed by GitHub
parent 8fb3a95df0
commit d91b5038c3

View File

@@ -442,11 +442,16 @@ Blockly.Toolbox.prototype.handleAfterTreeSelected_ = function(
if (this.lastCategory_ != newNode) {
this.flyout_.scrollToStart();
}
} else if (newNode instanceof Blockly.Toolbox.TreeSeparator){
// Do nothing
if (this.workspace_.keyboardAccessibilityMode) {
Blockly.navigation.setState(Blockly.navigation.STATE_TOOLBOX);
}
} else {
// Hide the flyout.
this.flyout_.hide();
if (this.workspace_.keyboardAccessibilityMode &&
!(newNode instanceof Blockly.Toolbox.TreeSeparator)) {
Blockly.navigation.setState(Blockly.navigation.STATE_WS);
}
}
if (oldNode != newNode && oldNode != this) {
var event = new Blockly.Events.Ui(null, 'category',