Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5982 closed bug (fixed)

Autocomplete: Race condition causes incorrect suggestions

Reported by: cardmeister Owned by:
Priority: minor Milestone: 1.8.5
Component: ui.autocomplete Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:

Description

This condition occurs when using a remote data source and is described by the following sequence:

(Note, "termA" and "termB" in this description are simply placeholders for any valid search term.)

1) User input meets minLength and delay requirements and search for termA begins.

2) Before results for termA are returned, user continues typing and triggers another search for termB.

3) termB results are returned while termA results are still pending.

4) termB results are displayed (as expected)

5) termA results are returned, and are displayed. User now has incorrect suggestions displayed.

This is easiest replicated by a using a back-end script which creates an artificially long delay for termA.

Change History (3)

comment:1 Changed 13 years ago by Scott González

Milestone: TBD1.9
Resolution: fixed
Status: newclosed
Summary: Race Condition causes incorrect suggestionsAutocomplete: Race condition causes incorrect suggestions

Fixed in f115b48.

comment:2 Changed 13 years ago by Scott González

Milestone: 1.91.8.5

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

Autocomplete: Don't handle remote data if it's not the most recent request. Fixes #5982 - Autocomplete: Race condition causes incorrect suggestions.

Changeset: f115b48d2bd79aff1f65fb895d1ebc9517d82edc

Note: See TracTickets for help on using tickets.