From 77fd1ff6e5d5dc89199e4cc3d01605ca65fc8f3d Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Wed, 8 Jan 2014 16:58:42 -0800 Subject: [PATCH] Focus cells after they are inserted. --- IPython/html/static/notebook/js/keyboardmanager.js | 2 ++ IPython/html/static/notebook/js/maintoolbar.js | 1 + 2 files changed, 3 insertions(+) diff --git a/IPython/html/static/notebook/js/keyboardmanager.js b/IPython/html/static/notebook/js/keyboardmanager.js index c51f082ae..86d62cf39 100644 --- a/IPython/html/static/notebook/js/keyboardmanager.js +++ b/IPython/html/static/notebook/js/keyboardmanager.js @@ -280,6 +280,7 @@ var IPython = (function (IPython) { handler : function (event) { IPython.notebook.insert_cell_above('code'); IPython.notebook.select_prev(); + IPython.notebook.focus_cell(); return false; } }, @@ -288,6 +289,7 @@ var IPython = (function (IPython) { handler : function (event) { IPython.notebook.insert_cell_below('code'); IPython.notebook.select_next(); + IPython.notebook.focus_cell(); return false; } }, diff --git a/IPython/html/static/notebook/js/maintoolbar.js b/IPython/html/static/notebook/js/maintoolbar.js index 6abe438f2..3bed0b01e 100644 --- a/IPython/html/static/notebook/js/maintoolbar.js +++ b/IPython/html/static/notebook/js/maintoolbar.js @@ -42,6 +42,7 @@ var IPython = (function (IPython) { callback : function () { IPython.notebook.insert_cell_below('code'); IPython.notebook.select_next(); + IPython.notebook.focus_cell(); } } ],'insert_above_below');