##// END OF EJS Templates
Don't scroll to bottom when last cell is selected.
Brian E. Granger -
Show More
@@ -24,10 +24,6 var IPython = (function (IPython) {
24 Cell.prototype.select = function () {
24 Cell.prototype.select = function () {
25 this.element.addClass('ui-widget-content ui-corner-all');
25 this.element.addClass('ui-widget-content ui-corner-all');
26 this.selected = true;
26 this.selected = true;
27 // TODO: we need to test across browsers to see if both of these are needed.
28 // In the meantime, there should not be any harm in having them both.
29 this.element.find('textarea').trigger('focusin');
30 this.element.find('textarea').trigger('focus');
31 };
27 };
32
28
33
29
@@ -31,7 +31,8 var IPython = (function (IPython) {
31 // i) provide a margin between the last cell and the end of the notebook
31 // i) provide a margin between the last cell and the end of the notebook
32 // ii) to prevent the div from scrolling up when the last cell is being
32 // ii) to prevent the div from scrolling up when the last cell is being
33 // edited, but is too low on the page, which browsers will do automatically.
33 // edited, but is too low on the page, which browsers will do automatically.
34 this.element.append($('<div class="end_space"></div>').height(150));
34 var end_space = $('<div class="end_space"></div>').height(150);
35 this.element.append(end_space);
35 $('div#notebook').addClass('border-box-sizing');
36 $('div#notebook').addClass('border-box-sizing');
36 };
37 };
37
38
@@ -155,9 +156,6 var IPython = (function (IPython) {
155 this.selected_cell().unselect();
156 this.selected_cell().unselect();
156 };
157 };
157 this.cells()[index].select();
158 this.cells()[index].select();
158 if (index === (this.ncells()-1)) {
159 this.scroll_to_bottom();
160 };
161 };
159 };
162 return this;
160 return this;
163 };
161 };
General Comments 0
You need to be logged in to leave comments. Login now