diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 4945a60b7..0d68216f9 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1358,6 +1358,10 @@ Blockly.WorkspaceSvg.prototype.markFocused = function() { this.options.parentWorkspace.markFocused(); } else { Blockly.mainWorkspace = this; + // We call e.preventDefault in many event handlers which means we + // need to explicitly grab focus (e.g from a textarea) because + // the browser will not do it for us. + this.getParentSvg().focus(); } };