Opened 14 years ago

Last modified 13 years ago

#2009 closed defect

Menu2/MenuItem2 disabled context menu items get class 'undefined' — at Version 1

Reported by: guest Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description (last modified by bill)

Disabled context menu's (from a tree context menu in my case - but it does not really matter) won't be grayed out because these items get the class 'undefined':

Menu2.js should read in function setDisabled (currently line 526 and line 528):

dojo.html.addClass(this.domNode, this.parent.disabledClass);
dojo.html.removeClass(this.domNode, this.parent.disabledClass);

instead of

dojo.html.addClass(this.domNode, this.disabledClass);
dojo.html.removeClass(this.domNode, this.disabledClass);

because the class "disabledClass" is defined in PopupMenu2 and not in MenuItem2.


Change History (1)

comment:1 Changed 14 years ago by bill

Description: modified (diff)

I reproduced the bug. The problem w/your fix is that for initially disabled items, when Menu2Item is created, this.parent isn't set. (Especially for programatic creation) Note also that MenuBarItem2 has hardcoded the classnames.

Note: See TracTickets for help on using tickets.