aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/login
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/login')
-rw-r--r--web/app/view/login/Login.js3
-rw-r--r--web/app/view/login/LoginController.js4
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();