diff --git a/lib/assets/javascripts/autocomplete-rails-uncompressed.js b/lib/assets/javascripts/autocomplete-rails-uncompressed.js
index <HASH>..<HASH> 100644
--- a/lib/assets/javascripts/autocomplete-rails-uncompressed.js
+++ b/lib/assets/javascripts/autocomplete-rails-uncompressed.js
@@ -24,7 +24,7 @@
       }
     };
     if (jQuery.fn.on !== undefined) {
-      return jQuery(document).on('focus',this.selector,handler);
+      return this.selector ? jQuery(document).on('focus',this.selector,handler) : undefined;
     }
     else {
       return this.live('focus',handler);
Fix selector bug:

There are cases, when this.selector is undefined.
If this is Google Chrome -- it will ignore this wrong selector;
If this is Mozilla Firefox - it will bind rails autocomplete to each element on the page