Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#2009 closed defect (fixed)

Menu2/MenuItem2 disabled context menu items get class 'undefined'

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 (5)

comment:1 Changed 16 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.

comment:2 Changed 16 years ago by alex

Milestone: 0.6
severity: majornormal

comment:3 Changed 16 years ago by bill

Status: newassigned

Actually, the problem is pretty severe (initially disabled items are showing up as enabled). Fixing now...

comment:4 Changed 16 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [6724]) Fixes #2009, and also fixes some API comments.

comment:5 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.