Alex -
Reviewe de code, s'il vous plait.

Description:
==========
If you click on a MenuItem that has a visible submenu, the visible submenu
is closed and the first MenuItem is selected, which is not the desired
behavior for an autoOpen menu.


Fix:
===
If autoOpen is enabled, clicking on a parent menu item does not close the
sub menu or change the current selection.  This is similar to the context
menu on Windows desktop.

If autoOpen is disabled, clicking on a parent menu item does close the
submenu, but leaves the current parent item selected.  This is similar with
the menu bar in most web browsers (FF and IE).

In the patch, the code block that I edited can only be reached if:
1. The clicked item does not have a command that would be fired
2. The clicked item's submenu is currently visible

So, if autoOpen is enabled, we ignore the event.  If autoOpen is disabled,
we close the submenu but leave the parent selected.


Testing:
======
Manually verified that this logic works without breaking anything else.

-- 
Thanks,
John LaBanca
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Attachment: MenuBar_StayOpenOnClick.patch
Description: Binary data

Reply via email to