]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix double call of changeEmailAddress()
authorMorris Jobke <morris.jobke@gmail.com>
Sat, 18 Jan 2014 21:59:49 +0000 (22:59 +0100)
committerMorris Jobke <morris.jobke@gmail.com>
Sat, 18 Jan 2014 21:59:49 +0000 (22:59 +0100)
settings/js/personal.js

index 010f0fc0a794faa047e775fe621f911018319d44..576a425ce528afbdfadd6d663cc5972d0a0dec62 100644 (file)
@@ -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);
             }