Skip to content

Commit eb1dd49

Browse files
authored
Fix microsoft#183076. Restore editor focus only if the DOM focus is inside the editor widget. (microsoft#183078)
1 parent 4700994 commit eb1dd49

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/contrib/interactiveEditor/browser/interactiveEditorController.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,11 @@ export class InteractiveEditorController implements IEditorContribution {
555555
this._ctxLastFeedbackKind.reset();
556556

557557
this._zone.hide();
558-
this._editor.focus();
558+
559+
// Return focus to the editor only if the current focus is within the editor widget
560+
if (this._editor.hasWidgetFocus()) {
561+
this._editor.focus();
562+
}
559563

560564
this._sessionStore?.dispose();
561565
this._sessionStore = undefined;

0 commit comments

Comments
 (0)