Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1299 closed defect (worksforme)

Events connected to cloned nodes in Internet Explorer 6 are connected to their source node

Reported by: guest Owned by: alex
Priority: blocker Milestone:
Component: Events Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


I get a node with dojo.byId. Than I connect a event to that node, like "dojo.event.connect(node,"onblur","func1")". Than I clone that node. Than I connect a new event to the clone, like "dojo.event.connect(node,"onblur","func2")", and append the node in the DOM tree.

The expected result is: when "onblur" the source node, the one that generates the clone, execute "func1", and when "onblur" the clone node, execute "func2".

The real result in Internet Explorer is: when "onblur" the clone node, nothing happens, when "onblur" the source node, both "func1" and "func2" are executed.

In FireFox? and Opera I get the expected result.



Attachments (1)

test_clone.html (1.2 KB) - added by bill 15 years ago.
testcase to go in tests/event directory (seems to work fine)

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by guest

Adding. This problem do not happens when...

The event connected to the clone are different, example: in source we connect "onclick" and in clone we connect "onblur"

If we connect the event after we clone the node

comment:2 Changed 15 years ago by dylan

Milestone: 0.4

comment:3 Changed 15 years ago by [email protected]

try in this order, with the connect *after* the cloneNode <html>



<script type="text/javascript" src="dojo/dojo.js">0.3.1</script> <!--script type="text/javascript" src="dojo/dojo.js.uncompressed.notify.js">0.3.1</script-->

<script type="text/javascript">

dojo.require("dojo.event"); dojo.addOnLoad(go); function go(){

var clonedNode = dojo.byId("first").cloneNode(); dojo.event.connect(dojo.byId("first"), "onblur", func1);"cloned";"100px";"blue"; dojo.event.connect(clonedNode, "onblur", func2); document.body.appendChild(clonedNode);

} function func1(){


} function func2(){






<div id="container"> <input type="text" id="first" style="width:100px;background:red"/> </div>

</body> </html> Bye!


comment:4 Changed 15 years ago by dylan


Changed 15 years ago by bill

Attachment: test_clone.html added

testcase to go in tests/event directory (seems to work fine)

comment:5 Changed 15 years ago by bill

OK, onblur is a bit confusing for a testcase, so I tried it w/onclick, but it seems to be working fine. I'm attaching a testcase. You didn't leave an email address so I can't ping you, but see if this works for you. If I don't hear anything I'm gonna close the bug as CNR.

comment:6 Changed 15 years ago by bill

Resolution: worksforme
Status: newclosed

comment:7 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.