Merge branch 'bug_659_cross_browser_charcode' of https://github.com/themasch/diaspora into themasch-bug_659_cross_browser_charcode

This commit is contained in:
MrZYX 2010-12-13 15:16:49 +01:00
commit a89aa9c5ab

View file

@ -11,8 +11,8 @@ var Validation = {
}, },
events: { events: {
usernameKeypress: function(evt) { usernameKeypress: function(evt) {
if(evt.charCode === 0) { return; } if(evt.keyCode === 0) { return; }
if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.charCode))) { if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.keyCode))) {
evt.preventDefault(); evt.preventDefault();
} }
} }