Opened 10 years ago

Closed 10 years ago

#10656 closed defect (wontfix)

dojo/connect inside StackContainer inside Contentpane doens't fire.

Reported by: millennium Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.0
Keywords: Contentpane IE dojo/connect Cc:
Blocked By: Blocking:

Description

The following code:

<html>
	<head>
		<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"	type="text/javascript" djConfig="parseOnLoad: true, isDebug: true"></script>
		<script type="text/javascript">
			dojo.require("dijit.layout.ContentPane");
			dojo.require("dijit.layout.StackContainer");
			dojo.addOnLoad(function() {
				console.log("console ok");
				cpTest.attr("href", "ietest_content.html");
			});
		</script>
	</head>	
	<body>
		<div dojotype="dijit.layout.ContentPane" jsId="cpTest">
			Lorem Ipsum
		</div> 
	</body>
</html>	

Which loads:

<div dojotype="dijit.layout.StackContainer">
	<script type="dojo/connect">
		console.log("so far so good");
	</script>	
	<div dojotype="dijit.layout.ContentPane">
		A pane.	
	</div>
</div>		

Works fine in FireFox? and Chrome. But fails in IE7&8. Expected to see "So Far So Good" in console.

Attachments (2)

ietest.html (587 bytes) - added by millennium 10 years ago.
Test file
ietest_content.html (211 bytes) - added by millennium 10 years ago.
Content to load

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by millennium

Attachment: ietest.html added

Test file

Changed 10 years ago by millennium

Attachment: ietest_content.html added

Content to load

comment:1 Changed 10 years ago by bill

Resolution: wontfix
severity: blockerminor
Status: newclosed

Thanks for uploading a test case.

IE has weird problems with script tags in the beginning of a file. Just move your script tag down and it works on IE:

<div dojoType="dijit.layout.StackContainer">
	<div dojoType="dijit.layout.ContentPane">
		A pane.	
	</div>
	<script type="dojo/method">
		console.log("so far so good");
	</script>	
</div>
Note: See TracTickets for help on using tickets.