<dl>
<dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt>
<dd>
- <input type="text" id="username" name="username" value="" required="required" class="long">
+ <input type="text" id="username" name="username" value="" required="required" class="long jsDialogAutoFocus">
</dd>
</dl>
this.rebuild(id);
+ // set focus on first applicable element
+ var focusElement = elBySel('.jsDialogAutoFocus', data.dialog);
+ if (focusElement !== null && focusElement.offsetParent !== null) {
+ focusElement.focus();
+ }
+
if (typeof data.onShow === 'function') {
data.onShow(id);
}