From 6ae0797040972dba5c3304f1c85999897eb2dfed Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 24 Nov 2011 21:22:00 +0000 Subject: [PATCH] Notebook: don't change cell when selecting code using shift+up/down. Closes gh-787; closes gh-1038 (rebased to prevent recursive merge). --- IPython/frontend/html/notebook/static/js/notebook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index d59105e12..8ef4e40ff 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -65,13 +65,13 @@ var IPython = (function (IPython) { // websocket connection with firefox event.preventDefault(); } - if (event.which === 38) { + if (event.which === 38 && !event.shiftKey) { var cell = that.selected_cell(); if (cell.at_top()) { event.preventDefault(); that.select_prev(); }; - } else if (event.which === 40) { + } else if (event.which === 40 && !event.shiftKey) { var cell = that.selected_cell(); if (cell.at_bottom()) { event.preventDefault();