diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index f6205123ea6c344042b29dff27e21daf1c2ab8ae..83aed1cf0b35df5a1ca4107c3fd120f005d1dca2 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -423,7 +423,17 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl getActions: () => TPromise.as(this.getContextMenuActions(identifier)), getActionsContext: () => identifier, getKeyBinding: (action) => this.getKeybinding(action), - onHide: (cancel) => this.resourceContext.set(currentContext) // restore previous context + onHide: (cancel) => { + + // restore previous context + this.resourceContext.set(currentContext); + + // restore focus to active editor if any + const editor = this.editorService.getActiveEditor(); + if (editor) { + editor.focus(); + } + } }); }