mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fixes #14550
This commit is contained in:
parent
9d47285026
commit
2d3b665468
|
@ -553,10 +553,14 @@ export class Workbench implements IPartService {
|
|||
if (hidden && this.sidebarPart.getActiveViewlet()) {
|
||||
this.sidebarPart.hideActiveViewlet();
|
||||
|
||||
// Pass Focus to Editor if Sidebar is now hidden
|
||||
const editor = this.editorPart.getActiveEditor();
|
||||
if (editor) {
|
||||
editor.focus();
|
||||
const activeEditor = this.editorPart.getActiveEditor();
|
||||
const activePanel = this.panelPart.getActivePanel();
|
||||
|
||||
// Pass Focus to Editor or Panel if Sidebar is now hidden
|
||||
if (this.hasFocus(Parts.PANEL_PART) && activePanel) {
|
||||
activePanel.focus();
|
||||
} else if (activeEditor) {
|
||||
activeEditor.focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue