From d91b5038c37e6af8c486e8b4bc04e289f18be970 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 9 Jun 2020 10:27:06 -0700 Subject: [PATCH] Revert not closing the flyout for a tree separator (#3944) --- core/toolbox.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/toolbox.js b/core/toolbox.js index 7ec5147e3..d57bfc911 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -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',