I am interested in building a stack overflow style tags input using jquery autocomplete.
So the main operations are:
- If you type 'a', queries with 'a' will show up (no problem, that's how jquery autocomplete works)
- If you press down or up to select a recommendation, the input box gets changed.
The trick here is that whenever the input is changed, only the last item is changed.
This means that if you take the value of the input, and select a query, only
var l = $input.val().split(' ');
l[l.length-1] will be changed
I tried monkeypatching jquery autocomplete's _value function, but to no success. I realized that even when you move up or down or esc, the input gets messed up as well. I am begging for someone who is experienced in this autocomplete to shed me some light on this