Page MenuHomePhabricator

jquery.suggestions should cancel any active (async) fetches before it triggers another fetch
Closed, ResolvedPublic

Description

"I type in a search term, and one or more relevant items might appear, but when I move the cursor into it, often I get a different list. As an example, I typed "the beatles", and at first it showed items beginning with "the beatles", then it jumped to all items starting with "the be". This kind of thing happens on both home and work PC's....It started happening when the word "Search" started to appear in the search box, instead of normally being blank."

User is reportedly using IE8


Version: 1.19
Severity: normal
URL: https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=519527267#Search_box

Details

Reference
bz41342

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:11 AM
bzimport set Reference to bz41342.
TheDJ created this task.Oct 24 2012, 8:07 AM

Important note, this is with the cologneblue skin.

[Low prio as long as we don't know if newer versions / other browsers are also affected]

Per bug 41349 search suggestions in CologneBlue are currently broken, there's a pending patchset linked on that bug.

That other bug was fixed (ages ago, in fact). Does this still happen?

So this is something completely different and I'm repurposing the bug.

Simply, Search Suggest suggestions are processed in the order API requests arrive, not in the order they're sent. So if you're on a lousy connection and type "wikipedia", 9 requests get sent (suggestions for "w", "wi", "wik", etc.), and they will not necessarily arrive in the same order.

Then you get the effect described above - suggestions for "wikipedia" flash briefly and then are replaced by suggestions for "wik", even though the bolding is correct.

The API has a requestid parameter, it should be used so we drop requests for suggestions older than the one currently displayed. A simple counter would suffice.

(One should test it using a debugging proxy like Fiddler.)

I submitted gerrit change 34972 to fix this issue (albeit in a slightly different way).

(In reply to comment #6)

I submitted Gerrit change #34972 to fix this issue.

Thanks, landed in master.

Change-Id: I880a61e5e45a64bea6d679ed160c4be3da085dfa