Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#4873 closed defect (invalid)

Menu items do not drop down when programmatically attached to a ComboButton

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

In an HTML page, a Menu with MenuItems? can be attached to a ComboButton? and when the down arrow is clicked, the MenuItems? appear normally. However, when a Menu is attached programmatically to a ComboButton?, the MenuItems? do not appear when the down arrow is clicked.

It could be way in which the programmatic elements are wired, but there is scant documentation or tests indicating how this wiring should occur.

Attachments (3)

dijitTestComboButtonMenuItem.2.html (3.0 KB) - added by guest 12 years ago.
dijitTestComboButtonMenuItem.html (3.0 KB) - added by guest 12 years ago.
dijitTestComboButtonMenuItem.3.html (2.9 KB) - added by bill 12 years ago.
correct version of test (working)

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by bill

Resolution: duplicate
Status: newclosed

Basically dup of #4874

comment:2 Changed 12 years ago by guest

Resolution: duplicate
Status: closedreopened

How is this is not a duplicate of #4873. Unless I am missing something, adding menu.domNode.style.display="none" does not show the menu/menuItems attached to the ComboButton?.

comment:3 Changed 12 years ago by guest

Did you test this?

Changed 12 years ago by guest

Changed 12 years ago by guest

comment:4 Changed 12 years ago by guest

The comment should be "How is this a duplicate of 4874?" Please re-run my second attachment. The drop down Menu/MenuItems? do not appear.

Changed 12 years ago by bill

correct version of test (working)

comment:5 Changed 12 years ago by bill

Resolution: invalid
Status: reopenedclosed

Ah, ok, there are multiple issues with your test. The main one is that you aren't following the API for how to add a menu to a button; see the API documentation generated from Button.js:

 *  var button1 = new dijit.form.DropDownButton({ label: "hi", dropDown: new dijit.Menu(...) });
 *	dojo.body().appendChild(button1);

I've uploaded a corrected version of your test case.

comment:6 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.