Skip to content

Commit a14db23

Browse files
dstansbyMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #14830: FIX: restore special casing of shift-enter in notebook
1 parent 0c724a9 commit a14db23

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)