It appears that autocomplete doesn't deal with trailing spaces.
How to reproduce: Create Tag terms "ab" and "a c". Create an article, in the Tags field type "a" - autocomplete suggests both terms. type " " and the autocomplete does't change. In fact the browser never requested more autocomplete results. Typing "c" will correctly show just the "a c" result
Same result with terms "a b" and "a c" - pasting "a c" into Tags field, then deleting the trailing c doesn't change the autocomplete suggestions.
Comments
Comment #1
Everett Zufelt commentedI haven't tested this, and would like to point out that completely removing autocomplete in favor of jQuery UI is being considered in #675446: Use jQuery UI Autocomplete.
However, this could make selecting the correct item more difficult, and it may be worthwhile for there to be a fix.
Comment #2
tkoleary commentedPlease follow progress on: #2346973: Improve usability, accessibility, and scalability of long select lists
Changing to Select2 may render this issue obsolete
Comment #3
nod_Still happening with jquery ui.
Comment #4
tkoleary commentedCannot reproduce as of beta10
Comment #5
longwaveThis is still reproducible in D7. This is because of the following regex in autocomplete.js:
Changing this to the following fixes the issue for me:
Comment #6
abhisaknigam commentedInstead off below code :
searchString = searchString.replace(/^\s+|\.{2,}\/|\s+$/g, '');
Try to use this code :
searchString = searchString.replace(/^\s+|\s+$/, '');