diff --git a/src/main.js b/src/main.js index 614ba25..1730edc 100755 --- a/src/main.js +++ b/src/main.js @@ -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 () {