We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43b8cce commit 1b5a56bCopy full SHA for 1b5a56b
packages/notebook-extension/src/index.ts
@@ -163,9 +163,15 @@ const closeTab: JupyterFrontEndPlugin<void> = {
163
commands.addCommand(id, {
164
label: trans.__('Close and Shut Down Notebook'),
165
execute: async () => {
166
- // Shut the kernel down, without confirmation
167
- await commands.execute('notebook:shutdown-kernel', { activate: false });
168
- window.close();
+ const confirm = window.confirm(
+ trans.__('Are you sure you want to close and shut down the notebook?')
+ );
169
+ if (confirm) {
170
+ await commands.execute('notebook:shutdown-kernel', {
171
+ activate: false,
172
+ });
173
+ window.close();
174
+ }
175
},
176
});
177
menu.fileMenu.closeAndCleaners.add({
0 commit comments