From 80dead5a9fe26e14a8b3621eab9c867a27f994d3 Mon Sep 17 00:00:00 2001
From: Morris Jobke <morris.jobke@gmail.com>
Date: Sat, 18 Jan 2014 22:59:49 +0100
Subject: [PATCH] fix double call of changeEmailAddress()

---
 settings/js/personal.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/settings/js/personal.js b/settings/js/personal.js
index 010f0fc0a79..576a425ce52 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -164,6 +164,11 @@ $(document).ready(function(){
 
     $('#email').keyup(function(){
         if ($('#email').val() !== '' ){
+            // if this is the enter key changeEmailAddress() is already invoked
+            // so it doesn't need to be triggered again
+            if(event.keyCode === 13) {
+                return;
+            }
             if(typeof timeout !== 'undefined'){
                 clearTimeout(timeout);
             }
-- 
GitLab