Skip to content

Commit 891b242

Browse files
authored
editors - do not focus empty editor group when created (microsoft#191963)
1 parent 5f7b620 commit 891b242

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/vs/workbench/browser/parts/editor/editorActions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,8 +2264,12 @@ abstract class AbstractCreateEditorGroupAction extends Action2 {
22642264
override async run(accessor: ServicesAccessor): Promise<void> {
22652265
const editorGroupService = accessor.get(IEditorGroupsService);
22662266

2267-
const group = editorGroupService.addGroup(editorGroupService.activeGroup, this.direction, { activate: true });
2268-
group.focus();
2267+
// We intentionally do not want the new group to be focussed so that
2268+
// a user can have keyboard focus e.g. in a tree/list, open a new
2269+
// editor group that is active and then arrow-up/down in the tree/list
2270+
// to pick an editor to open in that group
2271+
2272+
editorGroupService.addGroup(editorGroupService.activeGroup, this.direction, { activate: true });
22692273
}
22702274
}
22712275

0 commit comments

Comments
 (0)