From 1a8a24587f3272a66173924d309893a5f1e0b1f8 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Thu, 20 Jan 2022 17:45:54 -0600 Subject: [PATCH] Ensure that the proper editor is updated by syncing --- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index ab7d58baa..a53823671 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -709,6 +709,9 @@ export function Root(props: IProps): React.ReactElement { // Save changes openScript.code = serverScriptCode; + // Switch to target tab + onTabClick(index) + if (editorRef.current !== null && openScript !== null) { if (openScript.model === undefined || openScript.model.isDisposed()) { regenerateModel(openScript);