AutoComplete Sub-Menu, Navigation, and Other Suggestions
Hi all,
I am using AutoComplete from 1.10. I noticed that the AutoComplete does use the menu widget for its results, which is great, but it wasnt very intuitive to figure out how to get sub-menus to happen there. I did eventually figure that out though.
My real issue is with navigation. Even though AutoComplete uses Menu, and Menu supports expanding and collapsing of sub-menus using arrow navigation, the menu that is the AutoComplete results does not support this. It appears to be the case that the key bindings for AutoComplete dont even mention left/right arrows, so I dont think I even understand what keep the menu from functioning normally, but anywho. I did solve this by putting in some keybindings for LEFT and RIGHT under the AutoComplete that I have locally.
Is this a bug/oversight that can be corrected in the live version of jQuery UI? Even though I made it work (I think), it seems like a valuable change that I would rather see someone else (with better knowledge of the library) make. I am likely doing it wrong. :-(
Here is what I am doing:
- case keyCode.RIGHT:
- suppressKeyPress = true;
- if (this.menu.element.is(":visible")){
- event.preventDefault();
- this.menu.expand(event);
- }
- break;
- case keyCode.LEFT:
- suppressKeyPress = true;
- if (this.menu.element.is(":visible")){
- event.preventDefault();
- this.menu.collapse(event);
- }
- break;