Index: misc/autocomplete.js =================================================================== --- misc/autocomplete.js (revision 26) +++ misc/autocomplete.js (working copy) @@ -254,6 +254,13 @@ var db = this; this.searchString = searchString; + // See if this string needs to be searched for anyway. + searchString = searchString.replace(/^\s+|\s+$/, ''); + if (searchString.length <= 0 || + searchString.charAt(searchString.length - 1) == ',') { + return; + } + // See if this key has been searched for before if (this.cache[searchString]) { return this.owner.found(this.cache[searchString]);