diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 0cc31cb40..24e975ebc 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -82,7 +82,6 @@ const Editor = createClass({ if(prevProps.moveSource !== this.props.moveSource) { this.sourceJump(); }; - this.codeEditor.current?.codeMirror.focus(); }, handleControlKeys : function(e){ @@ -114,7 +113,10 @@ const Editor = createClass({ this.props.setMoveArrows(newView === 'text'); this.setState({ view : newView - }, this.updateEditorSize); //TODO: not sure if updateeditorsize needed + }, ()=>{ + this.codeEditor.current?.codeMirror.focus(); + this.updateEditorSize(); + }); //TODO: not sure if updateeditorsize needed }, getCurrentPage : function(){