#659 closed defect (fixed)
event.disconnect on a plain function doent work
Reported by: | Owned by: | alex | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Core | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
if you try to disconnect an event that was initialized on a plain function, it doesnt work.
like this:
<html> <head> <script src="../../dojo.js"></script> <script> dojo.require("dojo.event.*"); function plainFunc(evt){ alert(evt.currentTarget.innerHTML); dojo.event.disconnect(dojo.byId("click"), "onclick", plainFunc); } dojo.addOnLoad(function(){ dojo.event.connect(dojo.byId("click"), "onclick", plainFunc); }); </script> </head> <body> <a id="click" href="#">Alert me once, then never again!</a> </body> </html>
If you set srcObj to window it works, so its not a biggy.
/ Fredrik
Change History (3)
comment:1 Changed 15 years ago by
Owner: | changed from anonymous to alex |
---|---|
Status: | new → assigned |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
fixed in [4255]