Opened 10 years ago
Closed 10 years ago
#9456 closed bug (notabug)
AutoFocus flicker when combined with focus autocomplete("search")
Reported by: | SteveHansen | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.autocomplete | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hey guys,
I've come across an issue when using autocomplete with
autoFocus=true
combined with:
.focus(function (e) { $(this).autocomplete("search"); }
to open the list of options.
There's some kind of race condition where the first element in the list is selected for a second and then becomes deselected.
Both features work independently but when combined there is an issue.
Tested in chrome 28.
Note: See
TracTickets for help on using
tickets.
What you're seeing is the menu responding to the mouse click outside of the menu. The click event is still occurring at the time the menu is rendered. If you want to show the menu on focus, then you should use a delay (and you should actually use the focus event like your description says, as opposed to a click event like the fiddle is using).