Skip to content

Loading…

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

Closed
wants to merge 1 commit into from

2 participants

@takluyver
IPython member

Closes gh-787

@fperez
IPython member

Awesome, thanks! Merged and pushed.

@fperez
IPython member

mmh, auto-close not working... closing manually.

@fperez fperez closed this
@stefanv stefanv pushed a commit to stefanv/ipython that referenced this pull request
@takluyver takluyver Notebook: don't change cell when selecting code using shift+up/down.
Closes gh-787; closes gh-1038 (rebased to prevent recursive merge).
807f914
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request
@takluyver takluyver Notebook: don't change cell when selecting code using shift+up/down.
Closes gh-787; closes gh-1038 (rebased to prevent recursive merge).
7c19a22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/frontend/html/notebook/static/js/notebook.js
View
4 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();
Something went wrong with that request. Please try again.