From c92ce615bed30f1a1e23707b16814fbc66faf4be Mon Sep 17 00:00:00 2001 From: CSchulz Date: Sat, 14 Jun 2014 14:28:59 +0000 Subject: [PATCH] Changed event to focusout --- app/views/profiles/keys/new.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/profiles/keys/new.html.haml b/app/views/profiles/keys/new.html.haml index 126afa55540..46b7fc72869 100644 --- a/app/views/profiles/keys/new.html.haml +++ b/app/views/profiles/keys/new.html.haml @@ -5,7 +5,7 @@ = render 'form' :javascript - $('#key_key').on('keyup', function(){ + $('#key_key').on('focusout', function(){ var title = $('#key_title'), val = $('#key_key').val(), key_mail = val.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+|\.[a-zA-Z0-9._-]+)/gi); @@ -13,4 +13,4 @@ if( key_mail && key_mail.length > 0 && title.val() == '' ){ $('#key_title').val( key_mail ); } - }); + }); \ No newline at end of file