From 4a0555d9489a676d6651bcbbc00a2fb374ffb37c Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Fri, 5 Aug 2022 14:38:03 -0700 Subject: [PATCH] Fix #149606. Refresh notebook editor focus on tab switching. (#157333) --- .../workbench/contrib/notebook/browser/notebookEditorWidget.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index f802ab61bdc..9bd30b4ad13 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -1855,6 +1855,8 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD // The notebook editor doesn't have focus yet if (!this.hasEditorFocus()) { this.focusContainer(); + // trigger editor to update as FocusTracker might not emit focus change event + this.updateEditorFocus(); } if (element && element.focusMode === CellFocusMode.Editor) {