jeudi 2 octobre 2014

CheckBox changes on "Enter" Key

Hey,

I have a checkbox for a "remember me" functionality in a login form. The user "Tabs" through the fields and enters his information. Then he reaches the checkbox, toggles with "Space bar" and hits "Enter" to submit the form. Which is done on the form:



Code:




me.keys = me.keys.concat([{
key: [10,13],
handler: function() {me.submit(me.loginAction)},
scope: me
}]);

But the pressing of "Enter" also unchecks the CheckBox. How can I prevent this and only "listen" to space bar?



CheckBox changes on "Enter" Key

Aucun commentaire:

Enregistrer un commentaire