Opened 12 years ago

Closed 12 years ago

#10385 closed defect (fixed)

MenuBar: startup() of a MenuBar does not start items on its submenus

Reported by: jhrabows Owned by: bill
Priority: high Milestone: 1.5
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

This will happen on any 3-level menu like the one below. I thought that all I needed is to call startup() the top one (menuBar in this case). But that only calls startup on the PopupMenuBarItem? which is the direct child. The lack of other startup() calls causes the Arrow icon on the 2nd level PopupMenuItem? to remain hidden. I have tried it with 1.3 but I believe this is the case with 1.4 as well. I mark it as a defect because I find it hard to believe that this behavior is intentional.

       var pMenuBar = new dijit.MenuBar({});
       var pMenu = new dijit.Menu({});
       var pSubMenu = new dijit.Menu();
       pSubMenu.addChild(new dijit.MenuItem({   label: "Submenu item 1"     }));
       pSubMenu.addChild(new dijit.MenuItem({   label: "Submenu item 2"     }));
       pMenu.addChild(new dijit.PopupMenuItem({  label: "Submenu",   popup: pSubMenu    }));
       pMenuBar.addChild(new dijit.PopupMenuBarItem({ label: "Edit",   popup: pMenu   }));

Change History (2)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Milestone: tbd1.5
Owner: changed from anonymous to bill
Summary: startup() of a MenuBar does not start items on its submenusMenuBar: startup() of a MenuBar does not start items on its submenus

Thanks for the report, in the future can you attach a testcase using the "attach file" button?

I suppose the problem is because the PopupMenuBarItem's "child" is not a typical child (returned by getChildren()) etc.) so it needs special handling.

comment:2 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [21349]) Missing startup() call on the popup that PopupMenuItem points to, fixes #10385, !strict.

Note: See TracTickets for help on using tickets.