diff --git a/IPython/html/static/notebook/js/kernelselector.js b/IPython/html/static/notebook/js/kernelselector.js index d82200edd..5683c0d4a 100644 --- a/IPython/html/static/notebook/js/kernelselector.js +++ b/IPython/html/static/notebook/js/kernelselector.js @@ -60,7 +60,10 @@ define([ ks = this.kernelspecs[keys[i]]; ks_submenu_entry = $("
  • ").attr("id", "kernel-submenu-"+ks.name).append($('') .attr('href', '#') - .click($.proxy(this.set_kernel, this, ks.name)) + .click(function(){ + $.proxy(this.set_kernel, this, ks.name) + event.preventDefault(); + }) .text(ks.spec.display_name)); change_kernel_submenu.append(ks_submenu_entry); } @@ -70,7 +73,10 @@ define([ ks = this.kernelspecs[keys[i]]; ks_submenu_entry = $("
  • ").attr("id", "new-notebook-submenu-"+ks.name).append($('') .attr('href', '#') - .click($.proxy(this.new_notebook, this, ks.name)) + .click(function(){ + $.proxy(this.new_notebook, this, ks.name) + event.preventDefault(); + }) .text(ks.spec.display_name)); new_notebook_submenu.append(ks_submenu_entry); }