diff --git a/IPython/html/static/notebook/js/cell.js b/IPython/html/static/notebook/js/cell.js
index d76c697b1..ffe72cc89 100644
--- a/IPython/html/static/notebook/js/cell.js
+++ b/IPython/html/static/notebook/js/cell.js
@@ -288,6 +288,7 @@ var IPython = (function (IPython) {
* @method focus_editor
*/
Cell.prototype.focus_editor = function () {
+ this.refresh();
this.code_mirror.focus();
};