Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7597 closed bug (duplicate)

Autocomplete Deletes Text

Reported by: sexconker Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:


We're using autocompletes for a bunch of text fields that make an AJAX call to another page. The AJAX call hits up the database server (hosted on the same ESXi host), and returns some stuff.

If we enable the autoFocus option (to select the first result), we see problems when typing. If you type too fast, characters will be deleted. Alternatively (and easier to test / replicate), if you type some stuff in, then backspace through a few characters, some of them won't be deleted. If you backspace 4 times, you'll often only delete 2 or 3 characters.

"classroom", typed quickly, will yield "clasroom", "classoom", or similar. "classroom" followed by 4 backspaces will yield "classr" or "clasro".

This only happens if we have the autoFocus option enabled. We've tried different delay periods, and it seems to happen less frequently if we use a higher delay. The AJAX calls are returning in around 60ms, and even with the default delay of 300 we see this behavior.

Could this be a race condition between 2 separate AJAX calls? For example:


Delay met (1) Fire AJAX (1) Get and process results (1)

Backspace Backspace

Delay met (2) Fire AJAX (2)

Backspace Backspace

Delay met (3) Fire AJAX (3) Get and process results (3) Get and process results (2)

We've also seen this behavior in 1.8.5, when we were using a separate plugin to do the autoFocus, before that functionality was built-in.

I believe this bug may be similar to perhaps?

Change History (2)

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

Resolution: duplicate
Status: newclosed

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

Duplicate of #7555.

Note: See TracTickets for help on using tickets.