Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#5729 closed enhancement (wontfix)

Separator support for jquery.ui.autocomplete / complete only part of input

Reported by: blueyed Owned by:
Priority: minor Milestone:
Component: ui.autocomplete Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

The auto-completer is not very useful for tag completion currently: it will autocomplete the whole field and does not know anything about a separator, like ",".

I've added support for this and think that /\s*,\s*/ would be a good default for this (that is "," surrounded by any white space).

This would be even more useful, if it could complete parts which are not at the end of the input, e.g. "f_ , bar" would complete "foo" at the cursor position "_". For this to work however, we would need to get the current cursor position and there appears to be nothing useful in jQuery or jQuery UI core already (I've found e.g. http://plugins.jquery.com/node/6631). This could be added later quite easily, by not only remembering the current prefix, but also a suffix (and massaging the value according to the current cursor position).

Change History (4)

comment:2 Changed 9 years ago by blueyed

Oh well, I've just seen http://jqueryui.com/demos/autocomplete/#multiple - where it's possible to get a similar behaviour via different callbacks.

I still think that a simple option to get this behaviour would be handy though.

comment:3 Changed 9 years ago by Scott González

Resolution: wontfix
Status: newclosed

We don't plan on building multiple support into autocomplete. There will be a separate plugin that builds on top of autocomplete to provide this functionality. Feel free to contribute ideas, specs, etc. on the list builder wiki page.

comment:4 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.