From a103627aa5618b83360b79a07fa971ba9f41bc75 2015-03-28 20:39:24 From: Min RK Date: 2015-03-28 20:39:24 Subject: [PATCH] Backport PR #8176: Fixes bug that would show "null" as the reason in the don't leave dialog IE treats null as a string and displays it. Instead simply return. Fix verified in Chrome, FireFox, and IE 10. --- diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 5f572ad..3e40ceb 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -301,9 +301,8 @@ define(function (require) { 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. - return null; + // IE treats null as a string. Instead just return which will avoid the dialog. + return; }; };