Fixing bugs in CodeMirror refreshing.

Brian Granger 14 years ago
parent 1e2e086508
commit e6e7d41f5b

@ -550,7 +550,6 @@ var IPython = (function (IPython) {
text = '';
};
if (target_cell !== null) {
//if (text === "") {text = target_cell.placeholder;};
// The edit must come before the set_text.
target_cell.edit();
target_cell.set_text(text);
@ -575,7 +574,6 @@ var IPython = (function (IPython) {
text = '';
};
if (target_cell !== null) {
if (text === "") {text = target_cell.placeholder;};
// The edit must come before the set_text.
target_cell.edit();
target_cell.set_text(text);
@ -1167,7 +1165,7 @@ var IPython = (function (IPython) {
this.start_kernel();
}
this.select(0);
this.notebook.scroll_to_top();
this.scroll_to_top();
IPython.save_widget.update_url();
IPython.layout_manager.do_resize();
};

@ -100,7 +100,8 @@ var IPython = (function (IPython) {
// refresh/focus/refresh, the to_markdown method won't work.
this.code_mirror.refresh();
this.code_mirror.focus();
this.code_mirror.refresh();
// In some wierd cases we seem to need this extra refresh.
//this.code_mirror.refresh();
this.rendered = false;
if (this.get_text() === this.placeholder) {
this.set_text('');

Loading…
Cancel
Save