diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index a182d57742d..848073af3e6 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -235,6 +235,11 @@ void ShaderEditor::_menu_option(int p_option) { void ShaderEditor::_tab_changed(int p_which) { + ShaderTextEditor *shader_editor = tab_container->get_child(p_which)->cast_to(); + + if (shader_editor) + shader_editor->get_text_edit()->grab_focus(); + ensure_select_current(); }