autofocus the login input in the login modal

This commit is contained in:
Régis Hanol 2013-03-05 23:42:12 +01:00
parent cf09e200a5
commit 21407d1df4
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@
<label for='login-account-name'>{{i18n login.username}}&nbsp;</label> <label for='login-account-name'>{{i18n login.username}}&nbsp;</label>
</td> </td>
<td> <td>
{{view Discourse.TextField valueBinding="view.loginName" placeholderKey="login.email_placeholder" elementId="login-account-name" autocorrect="off" autocapitalize="off"}} {{view Discourse.TextField valueBinding="view.loginName" placeholderKey="login.email_placeholder" elementId="login-account-name" autocorrect="off" autocapitalize="off" autofocus="autofocus"}}
</td> </td>
<tr> <tr>
<td> <td>

View File

@ -7,7 +7,7 @@
@module Discourse @module Discourse
**/ **/
Discourse.TextField = Ember.TextField.extend({ Discourse.TextField = Ember.TextField.extend({
attributeBindings: ['autocorrect', 'autocapitalize'], attributeBindings: ['autocorrect', 'autocapitalize', 'autofocus'],
placeholder: (function() { placeholder: (function() {
return Em.String.i18n(this.get('placeholderKey')); return Em.String.i18n(this.get('placeholderKey'));