Opened 8 years ago

Closed 8 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.

fiddle: http://jsfiddle.net/Beefo/VaWmY/6/

Change History (1)

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

Resolution: notabug
Status: newclosed

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).

Note: See TracTickets for help on using tickets.