Bug Tracker

Opened 11 years ago

Closed 10 years ago

#3166 closed bug (invalid)

[autocomplete 1.0.2] Plugin: Suggestions wrong if minChar set to 0

Reported by: chris75 Owned by:
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: autocomplete Cc:
Blocked by: Blocking:

Description

Let's say you use autocomplete with the 'mutliple' option and 'minChar' set to 0. If you focus the input element with autocompletion and type the 'arrow down' button you get a complete list of suggestions from the backend. I choose one from the list which will be automatically added to the input field including the sperator (default ", ") at the end. Then I type again the 'arrow down' button to fetch the complete list again. That's where the error happens. I only get a list with one item, the item selected before.

My solution to this problem: Change line 255 in jquery.autocomplete.js from:

if ( $.trim(value) ) )

to:

if ( $.trim(value) || (!$.trim(value) && options.minChars == 0) )

For this solution works - don't know if there are any side effects?

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .

Note: See TracTickets for help on using tickets.