Skip to content
Snippets Groups Projects
Commit 5956277e authored by Jan-Christoph Borchardt's avatar Jan-Christoph Borchardt
Browse files

Merge pull request #6234 from owncloud/change-email-by-enter

change mail address by pressing enter - fixes #6179
parents 0daabe5b 80dead5a
No related branches found
No related tags found
No related merge requests found
......@@ -165,6 +165,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);
}
......@@ -172,6 +177,18 @@ $(document).ready(function(){
}
});
$('#email').keypress(function(event){
// check for enter key and non empty email
if (event.keyCode === 13 && $('#email').val() !== '' ){
event.preventDefault()
// clear timeout of previous keyup event - prevents duplicate changeEmailAddress call
if(typeof timeout !== 'undefined'){
clearTimeout(timeout);
}
changeEmailAddress();
}
});
$("#languageinput").change( function(){
// Serialize the data
var post = $( "#languageinput" ).serialize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment