-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancelling "Close and Shut Down Notebook" closes tab anyway #7359
Comments
Same issue in fedora 39Hello @stanwest I've encountered the same issue described here on my Fedora 39 system. When attempting to close and shut down a notebook from the "File" menu, the browser tab closes instead of just the dialog, while the kernel remains running. BTW I'm new to open source contributions, but I'm eager to learn and help resolve this problem. This would be my first contribution to an open source project, and I'm excited about the opportunity to work on such a widely-used tool . I would welcome any suggestions from your side as well as it helps me learning new things and ideas :) |
The "Close and Shut Down Notebook…" command seems to be defined in this code in JupyterLab's notebook-extension package: |
The command above is also available in notebooks in JupyterLab, but the cancel button works as expected. |
In Notebook 7.2.0, if I open the command palette and select "Close and Shut Down Notebook…" under the Notebook Operations section, I see the same confirmation dialog. The cancel button works as expected. This represents command I only see this bug if I select "Close and Shut Down Notebook…" from the File menu. This represents command |
The plugin declared in Jupyter Notebook's notebook/packages/notebook-extension/src/index.ts Lines 146 to 177 in 0a66f40
I say this because there is no |
@jtpio I've been looking at the build scripts and I've also found a problem with |
I can reproduce this in Notebook 7.0.0 — it looks like the issue has been present since Notebook started using JupyterLab code with version 7. |
@stanwest regarding the issue for the tab being closed even after selecting "Cancel", we should probably fix this here and check the return value of the executed command: notebook/packages/notebook-extension/src/index.ts Lines 166 to 167 in 0a66f40
@JasonWeill thanks for looking into this! Normally all the packages should be correctly built, but there could indeed be some issues related to the local dev setup. Let's look into those in #7379 then. |
The expected behavior in the classic notebook was that the confirmation dialog doesn't appear at all; the |
Description
When I select "Close and Shut Down Notebook" from the "File" menu and then either click its "Cancel" button or hit the Escape key, the browser tab closes. The kernel remains running.
Reproduce
Expected behavior
I expected the notebook tab to remain open.
Context
I'm happy to provide troubleshooting output as needed.
The text was updated successfully, but these errors were encountered: