Autocomplete failing at random for some nicks (including, and especially bz)

RESOLVED FIXED

Status

()

defect
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dylan, Assigned: kohei)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

It seems that /rest/elastic/suggest_users is returning 304 quite often.
And this is resulting in auto completion not working.
Duplicate of this bug: 1406951
I don't think those 304s are related any more. I've been able to reproduce it sometimes, and the problem seems to be JS side.

I thought it might have to do with a key-up event, because it doesn't happen for :bz when I paste that in, just when I type it.
It might be that devBridgeAutocomplete is caching something as well...


Finally, when I look at event hanlers on #needinfo_from, I'm seeing the event handlers for #needinfo!
Priority: -- → P1
I can't reduce this at the moment, and I also can only reproduce it in Firefox.

Do you happen to have any knowledge of behavior changes in onChange/keyDown/etc events that might have broken autocompletion only some of the time? I think event ordering might be the cause.
Flags: needinfo?(kohei.yoshino)
Tested quickly:

I _can_ reproduce the issue with Chrome as well. If you type slowly, a search result of ":b" will be returned with zero users and it will be cached by the Autocomplete plug-in. After that, any of subsequent searches starting with ":b" will be ignored. I guess the solution here is simply disabling the cache with the `noCache` option as documented in https://github.com/devbridge/jQuery-Autocomplete
Flags: needinfo?(kohei.yoshino)
Posted file pull request
Assignee: dylan → kohei.yoshino
Status: NEW → ASSIGNED
(In reply to Kohei Yoshino [:kohei] from comment #5)
> Tested quickly:
> 
> I _can_ reproduce the issue with Chrome as well. If you type slowly, a
> search result of ":b" will be returned with zero users and it will be cached
> by the Autocomplete plug-in. After that, any of subsequent searches starting
> with ":b" will be ignored. I guess the solution here is simply disabling the
> cache with the `noCache` option as documented in
> https://github.com/devbridge/jQuery-Autocomplete

thank you so much!
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.