Opened 10 years ago

Closed 10 years ago

#10278 closed defect (invalid)

MenuBar with MenuItem disabled fire onclick event

Reported by: Jean-Pascal Laux Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

I have menubar with some menuitems disabled but if I define an onclick function to a disabled menuitem, a click of this item is fired. If the onclick function is defined in the HTML code, it works fine

Attachments (1)

test2.html (2.0 KB) - added by Jean-Pascal Laux 10 years ago.
Example

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by Jean-Pascal Laux

Attachment: test2.html added

Example

comment:1 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed

Thanks for the test case.

This code in the test case is invalid:

obj=dojo.byId("EB1");
dojo.connect(obj,"onclick","menu")

Since EB1 is a widget, you should be using dijit to specify the onClick handler ("onClick" with a capital "C").

dijit.byId("EB1").attr("onClick", function(){ alert("foo"); });

Also, the final argument to dojo.connect() should be a function, not a string.

Note: See TracTickets for help on using tickets.