summaryrefslogtreecommitdiffstats
path: root/apps/contacts
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-04-21 23:51:30 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-04-22 00:44:53 +0200
commit56e064bd091d4ab54124bf9cd35eee3397d40a0c (patch)
tree1bf2a228b2e4799048b74daa29d22e8ff91774e9 /apps/contacts
parent16fc4dfd1add9a588ed6052a94fff03a37fa7dfd (diff)
downloadnextcloud-server-56e064bd091d4ab54124bf9cd35eee3397d40a0c.tar.gz
nextcloud-server-56e064bd091d4ab54124bf9cd35eee3397d40a0c.zip
Don't trigger unnecessary change events.
Diffstat (limited to 'apps/contacts')
-rw-r--r--apps/contacts/js/jquery.multi-autocomplete.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/contacts/js/jquery.multi-autocomplete.js b/apps/contacts/js/jquery.multi-autocomplete.js
index e1c5d63dc5f..5516a74b039 100644
--- a/apps/contacts/js/jquery.multi-autocomplete.js
+++ b/apps/contacts/js/jquery.multi-autocomplete.js
@@ -31,7 +31,9 @@
} else {
self.element.val(tmp);
}
- self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
+ if(self.element.val().trim() != '') {
+ self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
+ }
});
this.element.bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB &&