Skip to content

Commit ed74bfa

Browse files
authored
Merge pull request microsoft#196482 from microsoft/benibenj/fixFocusMaximize
Fix focus issue when unmaximizing a group in EditorPart
2 parents c404133 + 0384d0d commit ed74bfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/browser/parts/editor/editorPart.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export class EditorPart extends Part implements IEditorPart {
377377
return; // need at least 2 groups to be maximized
378378
}
379379
this.gridWidget.maximizeView(target);
380-
this.doSetGroupActive(target);
380+
target.focus();
381381
break;
382382
case GroupsArrangement.EXPAND:
383383
this.gridWidget.expandView(target);
@@ -403,6 +403,8 @@ export class EditorPart extends Part implements IEditorPart {
403403

404404
private unmaximizeGroup(): void {
405405
this.gridWidget.exitMaximizedView();
406+
// When making views visible the focus can be affected, so restore it
407+
this._activeGroup.focus();
406408
}
407409

408410
private hasMaximizedGroup(): boolean {

0 commit comments

Comments
 (0)