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:
commit
a89aa9c5ab
1 changed files with 2 additions and 2 deletions
|
|
@ -11,8 +11,8 @@ var Validation = {
|
|||
},
|
||||
events: {
|
||||
usernameKeypress: function(evt) {
|
||||
if(evt.charCode === 0) { return; }
|
||||
if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.charCode))) {
|
||||
if(evt.keyCode === 0) { return; }
|
||||
if(!Validation.rules.username.characters.test(this.value + String.fromCharCode(evt.keyCode))) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue