From d5d3bf5162629fd46b4a2d4171bcdc726722d8b5 2013-11-01 19:53:38 From: Paul Ivanov <pivanov314@gmail.com> Date: 2013-11-01 19:53:38 Subject: [PATCH] Merge pull request #4410 from ivanov/close-new-tabs-chrome make close-and-halt work on new tabs in Chrome --- diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js index 2401c47..85419f5 100644 --- a/IPython/html/static/notebook/js/menubar.js +++ b/IPython/html/static/notebook/js/menubar.js @@ -131,7 +131,11 @@ var IPython = (function (IPython) { }); this.element.find('#kill_and_exit').click(function () { IPython.notebook.session.delete(); - setTimeout(function(){window.close();}, 500); + setTimeout(function(){ + // allow closing of new tabs in Chromium, impossible in FF + window.open('', '_self', ''); + window.close(); + }, 500); }); // Edit this.element.find('#cut_cell').click(function () {