Skip to content

Commit aef9fe8

Browse files
authored
Merge pull request #14864 from meeseeksmachine/auto-backport-of-pr-14830-on-v3.1.x
Backport PR #14830 on branch v3.1.x (FIX: restore special casing of shift-enter in notebook)
2 parents 0c724a9 + a14db23 commit aef9fe8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

+3-6
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)