diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index e7446f8bb..47147381e 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -241,7 +241,12 @@ namespace FlaxEditor.CustomEditors.Dedicated var multiAction = new MultiUndoAction(actions); multiAction.Do(); - ScriptsEditor.Presenter?.Undo.AddAction(multiAction); + var presenter = ScriptsEditor.Presenter; + if (presenter != null) + { + presenter.Undo.AddAction(multiAction); + presenter.Control.Focus(); + } } }