From 9e7d7f420fa14095abbaf7395cee9644e5eacb8e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Dec 2010 00:57:56 +0300 Subject: [PATCH] hate text editing in nano --- app/views/invitations/edit.html.haml | 2 +- app/views/registrations/new.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/invitations/edit.html.haml b/app/views/invitations/edit.html.haml index 306d4fd18..a894947be 100644 --- a/app/views/invitations/edit.html.haml +++ b/app/views/invitations/edit.html.haml @@ -8,7 +8,7 @@ }; $("#user_username").keypress(function(evt) { - if(!Validation.username.characters.test(this.value + String.fromCharCode($ + if(!Validation.username.characters.test(this.value + String.fromCharCode(evt.charCode)) { evt.preventDefault(); } }); diff --git a/app/views/registrations/new.html.haml b/app/views/registrations/new.html.haml index cfe6e2dc2..918acd57b 100644 --- a/app/views/registrations/new.html.haml +++ b/app/views/registrations/new.html.haml @@ -8,7 +8,7 @@ }; $("#user_username").keypress(function(evt) { - if(!Validation.username.characters.test(this.value + String.fromCharCode($ + if(!Validation.username.characters.test(this.value + String.fromCharCode(evt.charCode)) { evt.preventDefault(); } });