]> git.mxchange.org Git - friendica.git/commitdiff
autocomplete: small fix to js
authorFabio Comuni <fabrix.xm@gmail.com>
Wed, 26 Oct 2011 12:18:05 +0000 (14:18 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Wed, 26 Oct 2011 12:18:05 +0000 (14:18 +0200)
js/fk.autocomplete.js

index e58ed18cd3a8f24807d19750dacc370200e7c1f5..1484758add7091ccecf1994305ab45553b4a0290 100644 (file)
@@ -120,6 +120,9 @@ function ContactAutocomplete(element,backend_url){
        this.popup=null;
        var that = this;
        
+       $(element).unbind('keydown');
+       $(element).unbind('keyup');
+       
        $(element).keydown(function(event){
                if (that.popup!==null) that.popup.onkey(event);
        });
@@ -145,15 +148,14 @@ function ContactAutocomplete(element,backend_url){
        
 }
 
+
 /**
  * jQuery plugin 'contact_autocomplete'
  */
 (function( $ ){
-  var map=new Array();
   $.fn.contact_autocomplete = function(backend_url) {
     this.each(function(){
-               if (this in map) return;
-               map[this] = new ContactAutocomplete(this, backend_url);
+               new ContactAutocomplete(this, backend_url);
        });
   };
 })( jQuery );