This commit is contained in:
Juan Ferrer Toribio 2017-09-22 13:12:07 +02:00
commit a6e2657618
1 changed files with 14 additions and 1 deletions

View File

@ -165,16 +165,29 @@ var App =
_onKeyPress: function (e)
{
var target = event.target || event.srcElement;
switch (e.keyCode)
{
case 13: // Enter
this._onEnterClick ();
this._onEnterPress (target);
break;
case 27: // Esc
window.close ();
break;
}
},
_onEnterPress: function(target)
{
if ( target && target.id == 'user' && this.$('password').value == '')
{
this.$('password').focus ();
return;
}
this._onEnterClick ();
},
_onEnterClick: function ()
{