mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +08:00
Refs #1084 Do not hide menus by click on menu item with sub menu
This commit is contained in:
parent
f0334ca9c8
commit
9ce9d62672
@ -742,16 +742,18 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
|
||||
* Shows the child menu of an item. The caller must ensure that the item has
|
||||
* a submenu.
|
||||
*
|
||||
* @param item
|
||||
* @param item Menu item
|
||||
*/
|
||||
public void showChildMenu(CustomMenuItem item) {
|
||||
popup = new VOverlay(false, false, true);
|
||||
popup = new VOverlay(true, false, true);
|
||||
|
||||
//sets Id for popup if Ids in DOM are available
|
||||
client.setElementId(popup.getElement(), getDebugId());
|
||||
|
||||
popup.setWidget(item.getSubMenu());
|
||||
popup.addCloseHandler(this);
|
||||
popup.addAutoHidePartner(this.getElement());
|
||||
popup.addAutoHidePartner(item.getElement());
|
||||
|
||||
if (subMenu) {
|
||||
popup.setPopupPosition(item.getParentMenu().getAbsoluteLeft()
|
||||
@ -781,7 +783,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
|
||||
return debugId;
|
||||
}
|
||||
|
||||
protected void showChildMenuAt(CustomMenuItem item, int top, int left) {
|
||||
/*protected void showChildMenuAt(CustomMenuItem item, int top, int left) {
|
||||
final int shadowSpace = 10;
|
||||
|
||||
popup = new VOverlay(true, false, true);
|
||||
@ -837,11 +839,11 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* Hides the submenu of an item
|
||||
*
|
||||
* @param item
|
||||
* @param item Menu item
|
||||
*/
|
||||
public void hideChildMenu(CustomMenuItem item) {
|
||||
if (visibleChildMenu != null
|
||||
|
Loading…
Reference in New Issue
Block a user