Focusing username field on signup and login notes upon loading.
This commit is contained in:
parent
4807db7feb
commit
89f97dd7a4
|
@ -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" );
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue