diff options
Diffstat (limited to 'misc/autocomplete.js')
-rw-r--r-- | misc/autocomplete.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js index aed6628b3..706a0cf2f 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -255,6 +255,12 @@ Drupal.ACDB.prototype.search = function (searchString) { var db = this; this.searchString = searchString; + // See if this string needs to be searched for anyway. + searchString = searchString.replace(/^\s+|\s+$/, ''); + if (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]); |