Opened 7 years ago

Closed 7 years ago

#15214 closed defect (invalid)

Problems creating a menu using templateString or store

Reported by: Lindby Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

When moving from 1.6 to 1.7.2 there are some visual problems (missing icons, separators and mouse-over effects) with menus created using templateString or a store. For instance:

var menuStr = '<div class="dijitMenu"> '
+ '<div dojoType="dijit.MenuItem" iconClass="dijitIconSave" onClick="alert(1)">Save</div>'
+ '<div dojoType="dijit.MenuSeparator"></div>'
+ '<div dojoType="dijit.MenuItem" iconClass="dijitIconDelete" onClick="alert(2)">Delete</div>'
+ '</div>';
										
var menu2 = new dijit.DropDownMenu({
templateString: menuStr,
style: "display: none;"
});
					
var downloadButton2 = new dijit.form.DropDownButton({
label: "OPTIONS",
iconClass: "invisibleIcon",			
dropDown: menu2
});

dojo.place(downloadButton2.domNode, "someNode");

/Rolf

Change History (1)

comment:1 Changed 7 years ago by bill

Resolution: invalid
Status: newclosed

Your template has widgets in it, but DropDownMenu doesn't extend _WidgetsInTemplateMixin. So you need to inherit from that mixin This is documented in the release notes.

Note: See TracTickets for help on using tickets.