It appears Onclick events are not processed for menu items that have sub-items.
I realize I could create a leaf item which users could use instead, but I would like to have my menu folders respond to OnClick (in my case to “launch” all sub-items)
Is there any way around this limitation?
Menu items that have sub-items do indeed fire
OnClickevents. But they fire when the sub-menu opens rather than when you click on the parent menu item.I’m pretty sure you don’t want to invoke all sub-items when that happens. The
OnClickevent for a parent menu fires whenever the sub-menu is opened. Either when you click on the parent menu item, hover over it, or press the right arrow key when the menu item is selected via the keyboard.So, the
OnClickevent for a parent menu corresponds to opening the sub-menu. Invoking all the child menu item actions when the sub-menu is opened goes against all standard expected UI behaviour. What you should do is add another sub-item that can be used to invoke all actions. Don’t go against the platform standard UI unless there are no sane alternatives.