mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
update before unload message
mention pending autosave, if applicable
This commit is contained in:
parent
09c7bba2b4
commit
a51f9e1a6e
@ -349,9 +349,11 @@ var IPython = (function (IPython) {
|
||||
// still warn, because if we don't the autosave may fail.
|
||||
if (that.dirty && ! that.read_only) {
|
||||
if ( that.autosave_interval ) {
|
||||
setTimeout(function() { that.save_notebook(); }, 0);
|
||||
that.save_notebook();
|
||||
return "Autosave in progress, latest changes may be lost.";
|
||||
} else {
|
||||
return "Unsaved changes will be lost.";
|
||||
}
|
||||
return "Unsaved changes will be lost.";
|
||||
};
|
||||
// Null is the *only* return value that will make the browser not
|
||||
// pop up the "don't leave" dialog.
|
||||
|
Loading…
Reference in New Issue
Block a user