From 1bbe4e9d96e0ee30a1fa5fdeb3aeddb947bae871 Mon Sep 17 00:00:00 2001 From: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:15:15 +0100 Subject: [PATCH] Focus panel if maximized otherwise editor (#236211) fix #205584 --- src/vs/workbench/browser/layout.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index ca6cb86039751..b60d286428356 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -1249,7 +1249,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi } focus(): void { - this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer)); + if (this.isPanelMaximized() && this.mainContainer === this.activeContainer) { + this.focusPart(Parts.PANEL_PART); + } else { + this.focusPart(Parts.EDITOR_PART, getWindow(this.activeContainer)); + } } private focusPanelOrEditor(): void {