diff --git a/static/js/Editor.js b/static/js/Editor.js index 6bf4398..a964176 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -179,9 +179,15 @@ Editor.prototype.finish_init = function () { if ( this.init_highlight ) self.highlight(); this.scrape_title(); - if ( this.init_focus ) + if ( this.init_focus ) { this.focus(); + // special-case: focus any username field + var username = withDocument( this.document, function () { return getElement( "username" ); } ); + if ( username ) + username.focus(); + } + signal( self, "init_complete" ); }