From df502540cc729b4e1c09f544bcf389eaf800ddc6 Mon Sep 17 00:00:00 2001 From: Fernando Perez Date: Mon, 28 Nov 2011 13:01:23 -0800 Subject: [PATCH] Fix bug where "don't leave" dialog was appearing when not needed in nb. Closes #1058 --- IPython/frontend/html/notebook/static/js/notebook.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index cf5c7faf3..d8b287683 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -204,7 +204,9 @@ var IPython = (function (IPython) { if (that.dirty && ! that.read_only) { return "You have unsaved changes that will be lost if you leave this page."; }; - return true; + // Null is the *only* return value that will make the browser not + // pop up the "don't leave" dialog. + return null; }); };