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);