1

We have a multi-tiered/hierarchical YUI menu activated via a YUI menu button. Everything in this menu works pretty well. If you mouseover a menu item with a submenu, the submenu appears as expected. You can select an item from this submenu just fine.

The problem, however, is that you can also click on the parent items of this menu which closes the entire menu. In fact, I want the opposite. I'd like a click of a parent menu item leave the top level menu open and open the submenu (i.e. I want a click to be identical to a mouseover event in terms of functionality).

Side note: This isn't an issue on a typical web browser (e.g. Firefox) where the click event doesn't matter because you can't have a click without a mouseover. This is an issue on the iPhone which doesn't have a mouseover event.

I've been playing with the autosubmenudisplay properties and keepopen properties, hoping I can just handle the parent item click events to do what I want but, so far, I've been unsuccessful. If I set autosubmenudisplay to false, I can't figure out how to get the submenus to display manually. The keepopen property doesn't seem to work rather I set it on the menu or submenus.

Is there a way to get the behavior I want so our iPhone users are happy?

2 Answers 2

1

Todd Kloots, author of the YUI Button and Menu widgets here. Took at look at your request. Unfortunately the current version YUI Button and Menu aren't designed to support the type of interaction you are looking to create. Feel free to file a feature request via SourceForge and I'll try to work on this for a future version of YUI.

  • Todd
1
  • Todd, I can get the behavior I want by creating a menu manually (it works on normal menus) and then showing it manually when the user clicks the button (i.e. my own menu/split button). I still have some positioning issues on the iPhone, however. Thanks for the comment. I'll add the request. Oct 30, 2008 at 13:42
0

It's not exactly what you asked for, but have you looked at iUI? You may be able to pick up some tricks from the implementation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.