Skip to content

Commit

Permalink
Merge pull request #4410 from ivanov/close-new-tabs-chrome
Browse files Browse the repository at this point in the history
make close-and-halt work on new tabs in Chrome
  • Loading branch information
ivanov committed Nov 1, 2013
2 parents 5bf4949 + 3685f6d commit d5d3bf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IPython/html/static/notebook/js/menubar.js
Expand Up @@ -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 () {
Expand Down

0 comments on commit d5d3bf5

Please sign in to comment.