From cff8e1969961698cbf83da28ad0df85ca593186d Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Fri, 15 Nov 2019 10:57:29 -0800 Subject: [PATCH] Return focus to the workspace after hiding a widget or dropdown div (#3447) --- core/dropdowndiv.js | 2 ++ core/widgetdiv.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/dropdowndiv.js b/core/dropdowndiv.js index 5931c937c..7730a829c 100644 --- a/core/dropdowndiv.js +++ b/core/dropdowndiv.js @@ -636,6 +636,8 @@ Blockly.DropDownDiv.hideWithoutAnimation = function() { } Blockly.DropDownDiv.clearContent(); Blockly.DropDownDiv.owner_ = null; + + Blockly.getMainWorkspace().markFocused(); }; /** diff --git a/core/widgetdiv.js b/core/widgetdiv.js index 0c846ed1f..90b37c4f0 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -97,6 +97,8 @@ Blockly.WidgetDiv.hide = function() { Blockly.WidgetDiv.dispose_ = null; Blockly.WidgetDiv.DIV.innerHTML = ''; } + + Blockly.getMainWorkspace().markFocused(); }; /**