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 diff --git a/ui-tests/test/mobile.spec.ts-snapshots/notebook-chromium-linux.png b/ui-tests/test/mobile.spec.ts-snapshots/notebook-chromium-linux.png index fee2e35a27..9535be4aa8 100644 Binary files a/ui-tests/test/mobile.spec.ts-snapshots/notebook-chromium-linux.png and b/ui-tests/test/mobile.spec.ts-snapshots/notebook-chromium-linux.png differ diff --git a/ui-tests/test/mobile.spec.ts-snapshots/notebook-firefox-linux.png b/ui-tests/test/mobile.spec.ts-snapshots/notebook-firefox-linux.png index db1c2ea08c..bf78c42dac 100644 Binary files a/ui-tests/test/mobile.spec.ts-snapshots/notebook-firefox-linux.png and b/ui-tests/test/mobile.spec.ts-snapshots/notebook-firefox-linux.png differ