Notebook: don't change cell when selecting code using shift+up/down.

Closes gh-787; closes gh-1038 (rebased to prevent recursive merge).
This commit is contained in:
Thomas Kluyver 2011-11-24 21:22:00 +00:00 committed by Fernando Perez
parent 4bd904c7ee
commit 6ae0797040

View File

@ -65,13 +65,13 @@ var IPython = (function (IPython) {
// websocket connection with firefox // websocket connection with firefox
event.preventDefault(); event.preventDefault();
} }
if (event.which === 38) { if (event.which === 38 && !event.shiftKey) {
var cell = that.selected_cell(); var cell = that.selected_cell();
if (cell.at_top()) { if (cell.at_top()) {
event.preventDefault(); event.preventDefault();
that.select_prev(); that.select_prev();
}; };
} else if (event.which === 40) { } else if (event.which === 40 && !event.shiftKey) {
var cell = that.selected_cell(); var cell = that.selected_cell();
if (cell.at_bottom()) { if (cell.at_bottom()) {
event.preventDefault(); event.preventDefault();