Can now login by pressing enter in the login field
},
components: [
{name: "loggedOutControls", components: [
- {tag: "form", onsubmit: "loginClicked", classes: "login", components: [
+ {tag: "form", onkeyup: "loginKeyUp", classes: "login", components: [
{kind: "onyx.Groupbox", components: [
{kind: "onyx.InputDecorator", components: [
{name: "username", kind: "onyx.Input", placeholder: "Username", attributes: {tabindex: 1}}
inEvent.preventDefault();
return true;
},
+ loginKeyUp: function(inSender, inEvent) {
+ if (inEvent.keyCode == 13) {
+ if (this.$.username.hasFocus()) {
+ this.$.password.focus();
+ } else {
+ this.loginClicked(this, inEvent);
+ }
+ return true;
+ }
+ },
logoutClicked: function() {
this.bubble('onTryLogout');
return true;