提交 d318d063 编写于 作者: S SteVen Batten

fixes #96889

上级 ac74b6ff
......@@ -1394,9 +1394,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}
// If panel part becomes hidden, also hide the current active panel if any
let focusEditor = false;
if (hidden && this.panelService.getActivePanel()) {
this.panelService.hideActivePanel();
this.editorGroupService.activeGroup.focus(); // Pass focus to editor group if panel part is now hidden
focusEditor = true;
}
// If panel part becomes visible, show last active panel or default panel
......@@ -1427,6 +1428,10 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
if (hidden && this.state.editor.hidden) {
this.setEditorHidden(false, true);
}
if (focusEditor) {
this.editorGroupService.activeGroup.focus(); // Pass focus to editor group if panel part is now hidden
}
}
toggleMaximizedPanel(): void {
......@@ -1446,7 +1451,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
} else {
this.setEditorHidden(false);
this.workbenchGrid.resizeView(this.panelPartView, { width: this.state.panel.position === Position.BOTTOM ? size.width : this.state.panel.lastNonMaximizedWidth, height: this.state.panel.position === Position.BOTTOM ? this.state.panel.lastNonMaximizedHeight : size.height });
this.editorGroupService.activeGroup.focus();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册