This commit is contained in:
Benjamin Pasero 2016-10-27 08:22:23 +02:00
parent 9d47285026
commit 2d3b665468

View file

@ -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();
}
}