From afa1e7974ae6629c94e66469e47a8fc004c5039e Mon Sep 17 00:00:00 2001 From: Gazook89 Date: Mon, 2 Sep 2024 21:07:19 -0500 Subject: [PATCH] Set focus on editor after tab switch This sets the focus on the editor (and thus reveals cursor position) between editor changes (style to text to meta and back). --- client/homebrew/editor/editor.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index 364ed424a..0cc31cb40 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -82,6 +82,7 @@ const Editor = createClass({ if(prevProps.moveSource !== this.props.moveSource) { this.sourceJump(); }; + this.codeEditor.current?.codeMirror.focus(); }, handleControlKeys : function(e){