Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a910afb

Browse filesBrowse files
minrktacaswell
authored andcommitted
explicitly select cell after figure on shift-enter
rather than triggering select-next, which may be an arbitrarily other cell
1 parent 9f1c730 commit a910afb
Copy full SHA for a910afb

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎lib/matplotlib/backends/web_backend/js/nbagg_mpl.js

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/web_backend/js/nbagg_mpl.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,9 @@ mpl.figure.prototype._key_event_extra = function(event, name) {
166166
// Check for shift+enter
167167
if (event.shiftKey && event.which == 13) {
168168
this.canvas_div.blur();
169-
event.shiftKey = false;
170-
// Send a "J" for go to next cell
171-
event.which = 74;
172-
event.keyCode = 74;
173-
manager.command_mode();
174-
manager.handle_keydown(event);
169+
// select the cell after this one
170+
var index = IPython.notebook.find_cell_index(this.cell_info[0]);
171+
IPython.notebook.select(index + 1);
175172
}
176173
}
177174

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.