Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#659 closed defect (fixed)

event.disconnect on a plain function doent work

Reported by: mumme@… 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 13 years ago by alex

Owner: changed from anonymous to alex
Status: newassigned

comment:2 Changed 13 years ago by alex

Resolution: fixed
Status: assignedclosed

fixed in [4255]

comment:3 Changed 12 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.