##// END OF EJS Templates
Prevent errors when up/down arrows are pressed in an empty notebook....
David Wyde -
Show More
@@ -137,13 +137,13 b' var IPython = (function (IPython) {'
137 }
137 }
138 if (event.which === key.UPARROW && !event.shiftKey) {
138 if (event.which === key.UPARROW && !event.shiftKey) {
139 var cell = that.get_selected_cell();
139 var cell = that.get_selected_cell();
140 if (cell.at_top()) {
140 if (cell && cell.at_top()) {
141 event.preventDefault();
141 event.preventDefault();
142 that.select_prev();
142 that.select_prev();
143 };
143 };
144 } else if (event.which === key.DOWNARROW && !event.shiftKey) {
144 } else if (event.which === key.DOWNARROW && !event.shiftKey) {
145 var cell = that.get_selected_cell();
145 var cell = that.get_selected_cell();
146 if (cell.at_bottom()) {
146 if (cell && cell.at_bottom()) {
147 event.preventDefault();
147 event.preventDefault();
148 that.select_next();
148 that.select_next();
149 };
149 };
General Comments 0
You need to be logged in to leave comments. Login now