Archived
1
0

Focusing username field on signup and login notes upon loading.

This commit is contained in:
Dan Helfman 2007-11-07 20:44:30 +00:00
parent 4807db7feb
commit 89f97dd7a4

View File

@ -179,9 +179,15 @@ Editor.prototype.finish_init = function () {
if ( this.init_highlight ) self.highlight(); if ( this.init_highlight ) self.highlight();
this.scrape_title(); this.scrape_title();
if ( this.init_focus ) if ( this.init_focus ) {
this.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" ); signal( self, "init_complete" );
} }