diff --git a/packages/notebook/src/browser/service/notebook-editor-widget-service.ts b/packages/notebook/src/browser/service/notebook-editor-widget-service.ts index 1502adcbabdaf..b585834ce6013 100644 --- a/packages/notebook/src/browser/service/notebook-editor-widget-service.ts +++ b/packages/notebook/src/browser/service/notebook-editor-widget-service.ts @@ -62,6 +62,9 @@ export class NotebookEditorWidgetService { } this.notebookEditors.set(editor.id, editor); this.onNotebookEditorAddEmitter.fire(editor); + if (editor.isVisible) { + this.notebookEditorFocusChanged(editor, true); + } } removeNotebookEditor(editor: NotebookEditorWidget): void {