I've been working with the autocomplete widget to create a categorized
list of choices -- similar to an optgroup in a select element. I bound
a function to the autocompleteshow event to add the categories to the
list, but ran into some problems with the scrolling behavior when
using the arrow keys.

I dug into the source, and found that on line 621 (of the 1.6rc2
code), replacing:
listItems.slice(0, active).each(...

with:
activeItem.prevAll().each(...

makes the scroll behavior work correctly even when other elements have
been added to the list.

I ran some quick timing tests, and over 50 calls with each method, the
average call time for moveSelect() was 3.881ms using slice() and
4.633ms using prevAll().

-Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to