From b2094734da041f8ef245cf3c197645a1d751a347 2012-01-06 03:20:17 From: MinRK Date: 2012-01-06 03:20:17 Subject: [PATCH] trigger textcell render on unselect instead of focusout --- diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index 16f1810..f24df58 100644 --- a/IPython/frontend/html/notebook/static/js/textcell.js +++ b/IPython/frontend/html/notebook/static/js/textcell.js @@ -65,6 +65,13 @@ var IPython = (function (IPython) { }; + TextCell.prototype.unselect = function() { + // render on selection of another cell + this.render(); + IPython.Cell.prototype.unselect.apply(this); + }; + + TextCell.prototype.edit = function () { if ( this.read_only ) return; if (this.rendered === true) { @@ -91,11 +98,8 @@ var IPython = (function (IPython) { var that = this; text_cell.dblclick(function () { that.edit(); - }).focusout(function () { - that.render(); }); - - text_cell.trigger("focusout"); + that.render(); };