Browse files

Fix bug where "don't leave" dialog was appearing when not needed in nb.

Closes #1058
  • Loading branch information...
1 parent 65ac74e commit 52fc956c68757ad1e0ac0fa6fd83403fd687ddc7 @fperez fperez committed Nov 28, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 IPython/frontend/html/notebook/static/js/notebook.js
View
4 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;
});
};

0 comments on commit 52fc956

Please sign in to comment.