From a99a07f10b97d79ed31ba3d52c8f95c5e4908331 Mon Sep 17 00:00:00 2001 From: MinRK Date: Wed, 17 Apr 2013 16:22:02 -0700 Subject: [PATCH] only save on close if autosaving --- IPython/frontend/html/notebook/static/js/notebook.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 47b49ba2c..181b93bd3 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -342,7 +342,8 @@ var IPython = (function (IPython) { if (kill_kernel) { that.kernel.kill(); } - if (that.dirty && ! that.read_only) { + // if we are autosaving, trigger an autosave on nav-away + if (that.dirty && that.autosave_interval && ! that.read_only) { that.save_notebook(); }; // Null is the *only* return value that will make the browser not