Opened 13 years ago
Closed 13 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)
Change History (2)
Changed 13 years ago by
Attachment: | test2.html added |
---|
comment:1 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
Example