##// END OF EJS Templates
restore "unsaved changes" warning on unload...
MinRK -
Show More
@@ -345,9 +345,13 b' var IPython = (function (IPython) {'
345 if (kill_kernel) {
345 if (kill_kernel) {
346 that.kernel.kill();
346 that.kernel.kill();
347 }
347 }
348 // if we are autosaving, trigger an autosave on nav-away
348 // if we are autosaving, trigger an autosave on nav-away.
349 if (that.dirty && that.autosave_interval && ! that.read_only) {
349 // still warn, because if we don't the autosave may fail.
350 that.save_notebook();
350 if (that.dirty && ! that.read_only) {
351 if ( that.autosave_interval ) {
352 setTimeout(function() { that.save_notebook(); }, 0);
353 }
354 return "Unsaved changes will be lost.";
351 };
355 };
352 // Null is the *only* return value that will make the browser not
356 // Null is the *only* return value that will make the browser not
353 // pop up the "don't leave" dialog.
357 // pop up the "don't leave" dialog.
General Comments 0
You need to be logged in to leave comments. Login now