diff --git a/src/client/repl/replCommandHandler.ts b/src/client/repl/replCommandHandler.ts index 0e4408d76bfb..13e7607b5cc8 100644 --- a/src/client/repl/replCommandHandler.ts +++ b/src/client/repl/replCommandHandler.ts @@ -31,7 +31,11 @@ export async function openInteractiveREPL( // Case where NotebookDocument doesnt exist, create a blank one. notebookDocument = await workspace.openNotebookDocument('jupyter-notebook'); } - const editor = window.showNotebookDocument(notebookDocument!, { viewColumn, asRepl: 'Python REPL' }); + const editor = window.showNotebookDocument(notebookDocument!, { + viewColumn, + asRepl: 'Python REPL', + preserveFocus: true, + }); await commands.executeCommand('notebook.selectKernel', { editor, id: notebookController.id,