From 96172955fdc719f7fbac614062f7e5f263a0c7f5 2012-01-23 19:56:07 From: Brian Granger Date: 2012-01-23 19:56:07 Subject: [PATCH] Adding refresh/focus/refresh back to edit to fix bug in FF. --- diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index eb8bdbf..07dd4c8 100644 --- a/IPython/frontend/html/notebook/static/js/textcell.js +++ b/IPython/frontend/html/notebook/static/js/textcell.js @@ -100,8 +100,10 @@ var IPython = (function (IPython) { // refresh/focus/refresh, the to_markdown method won't work. this.code_mirror.refresh(); this.code_mirror.focus(); - // In some wierd cases we seem to need this extra refresh. - //this.code_mirror.refresh(); + // 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(); this.rendered = false; if (this.get_text() === this.placeholder) { this.set_text('');