mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
Removing extra refresh that is no longer needed because of CM fix.
This commit is contained in:
parent
262d73f652
commit
0bc0c560aa
@ -530,11 +530,11 @@ var IPython = (function (IPython) {
|
||||
|
||||
CodeCell.prototype.select = function () {
|
||||
IPython.Cell.prototype.select.apply(this);
|
||||
// In some cases (inserting a new cell) we need a refresh before and
|
||||
// after the focus. Not sure why this is the case.
|
||||
this.code_mirror.refresh();
|
||||
this.code_mirror.focus();
|
||||
this.code_mirror.refresh();
|
||||
// We used to need an additional refresh() after the focus, but
|
||||
// it appears that this has been fixed in CM. This bug would show
|
||||
// up on FF when a newly loaded markdown cell was edited.
|
||||
};
|
||||
|
||||
|
||||
|
@ -96,14 +96,11 @@ var IPython = (function (IPython) {
|
||||
var output = text_cell.find("div.text_cell_render");
|
||||
output.hide();
|
||||
text_cell.find('div.text_cell_input').show();
|
||||
// I don't know why I need to do this, but if I don't do
|
||||
// refresh/focus/refresh, the to_markdown method won't work.
|
||||
this.code_mirror.refresh();
|
||||
this.code_mirror.focus();
|
||||
// This final refresh is needed on Firefox to trigger the editor
|
||||
// to be auto-sized. This glitch only happens on cell that are
|
||||
// loaded initially and haven't had their editor focused before.
|
||||
this.code_mirror.refresh();
|
||||
// We used to need an additional refresh() after the focus, but
|
||||
// it appears that this has been fixed in CM. This bug would show
|
||||
// up on FF when a newly loaded markdown cell was edited.
|
||||
this.rendered = false;
|
||||
if (this.get_text() === this.placeholder) {
|
||||
this.set_text('');
|
||||
|
Loading…
Reference in New Issue
Block a user