From b0dc933d7829f9fc0ac8d3775e91f338a2f1bddd Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Wed, 28 Oct 2015 14:59:50 -0700 Subject: [PATCH] Ensure focus is kept when extending the marked region --- notebook/static/notebook/js/notebook.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 27d3a49c1..91f4a7464 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -728,6 +728,8 @@ define(function (require) { var selectedIndex = Math.min(Math.max(this.get_selected_index() + offset, 0), this.ncells()-1); this.select(selectedIndex); this.get_selected_cell().marked = true; + + this.ensure_focused(); }; // Cell selection.