From 1283ebb60380e5d3c80135d0cecc9f4245d52f07 2014-01-07 22:42:35
From: Brian E. Granger <ellisonbg@gmail.com>
Date: 2014-01-07 22:42:35
Subject: [PATCH] Moving a cell focuses it after the move.

This way if you move a cell a long way, the noteobook div will
scroll with you.

---

diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js
index e57ff03..d66914f 100644
--- a/IPython/html/static/notebook/js/notebook.js
+++ b/IPython/html/static/notebook/js/notebook.js
@@ -566,6 +566,8 @@ var IPython = (function (IPython) {
                 tomove.detach();
                 pivot.before(tomove);
                 this.select(i-1);
+                var cell = this.get_selected_cell();
+                cell.focus_cell();
             };
             this.set_dirty(true);
         };
@@ -589,6 +591,8 @@ var IPython = (function (IPython) {
                 tomove.detach();
                 pivot.after(tomove);
                 this.select(i+1);
+                var cell = this.get_selected_cell();
+                cell.focus_cell();
             };
         };
         this.set_dirty();