diff options
Diffstat (limited to 'web/app/view/login')
-rw-r--r-- | web/app/view/login/Login.js | 3 | ||||
-rw-r--r-- | web/app/view/login/LoginController.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/web/app/view/login/Login.js b/web/app/view/login/Login.js index 3e23c4838..c56557186 100644 --- a/web/app/view/login/Login.js +++ b/web/app/view/login/Login.js @@ -40,7 +40,8 @@ Ext.define('Traccar.view.login.Login', { allowBlank: false, enableKeyEvents: true, listeners: { - specialKey: 'onSpecialKey' + specialKey: 'onSpecialKey', + afterrender: 'onAfterRender' } }, { xtype: 'textfield', diff --git a/web/app/view/login/LoginController.js b/web/app/view/login/LoginController.js index a88fffc09..c22b0e09a 100644 --- a/web/app/view/login/LoginController.js +++ b/web/app/view/login/LoginController.js @@ -22,6 +22,10 @@ Ext.define('Traccar.view.login.LoginController', { 'Traccar.view.login.Register' ], + onAfterRender: function(field) { + field.focus(); + }, + onSpecialKey: function(field, e) { if (e.getKey() === e.ENTER) { this.doLogin(); |