diff --git a/packages/docmanager-extension/src/index.ts b/packages/docmanager-extension/src/index.ts index d3bfff9a91..5d51e2e4e0 100644 --- a/packages/docmanager-extension/src/index.ts +++ b/packages/docmanager-extension/src/index.ts @@ -58,8 +58,10 @@ const opener: JupyterFrontEndPlugin = { widgetName.includes('Notebook') ) { // make sure to save the notebook before opening it in a new tab - // so the kernel info is saved - await widget.context.save(); + // so the kernel info is saved (if created from the New dropdown) + if (widget.context.sessionContext.kernelPreference.name) { + await widget.context.save(); + } route = 'notebooks'; } // append ?factory only if it's not the default