I put together a search based on a text field and a form observer. The
observer triggers an ajax method that does a paginated search of a large
number of items and does a render :update to update the list of items
with the new contents based on the search. Pretty standard stuff.
The weirdness is that the very first character typed in the search term
field typically results in a large number of items to return. The
second character greatly reduces the size of the results, as do the
subsequent characters typed in.
What happens visually is that if you type a few characters quickly, you
get the expected short list of results…followed a second or two later
by the larger result set appropriate to the first character typed. The
logging confirms that the rails app is doing the right thing in the
It appears that it is simply the size of that first set of results that
is causing it to take longer to get to the browser, so it winds up being
displayed out of order.
Anybody run into something like this before? Did you come up with some