Opened 12 years ago

Closed 11 years ago

#4663 closed defect (wontfix)

IE6/IE7: <script type="dojo/method"> at top of file ignored

Reported by: guest Owned by: alex
Priority: high Milestone: 1.3
Component: Parser Version: 0.9
Keywords: ContenPane Extensionpoint Markup Cc:
Blocked By: Blocking:

Description (last modified by bill)

Description:

View the following testpages in your Firefox. A logentry is created, when the extensionpoint 'postMixInProperties' is called. In Internet Explorer 6/7 there is no logentry, the extensionpoint is never called.

Expected behaviour:
The method postMixInProperties should be called on any of the browsers.

testMainPage:

Set the path to dojo.js according to your installation!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
	"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>ContentPaneBug - postMixInProperties in IE6/7</title>

	<script type="text/javascript" src="../dojo/dojo.js"
		djConfig="isDebug: true, parseOnLoad: true">
	</script>

	<script type="text/javascript">
		dojo.require("dojo.parser");
		dojo.require("dijit.form.Button");
		dojo.require("dijit.layout.ContentPane");
		dojo.require("dijit.dijit");
	</script>
</head>
<body>
	<div dojoType="dijit.layout.ContentPane" href="testContentPaneDetail.html"></div>
</body>
</html>

testContentPaneDetail.html:

Put in into the same directory as testmainpage.html.

<div dojoType="dijit.layout.ContentPane">
	<script type="dojo/method" event="postMixInProperties">
				console.log('postMixInProperties');
	</script>
	<div>Testcontent</div>
</div>

Change History (8)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Milestone: 1.1
Owner: anonymous deleted

comment:2 Changed 12 years ago by guest

Thank you for checking the bug, bill. Can you recommend a workaround for that? Because we need to support IE in our project and this bug is a real showstopper if one relies heavily on loading parts of the application in a ContentPane? and putting local functions to the scope of the pane to give some structure to our javascript. If there is no possible workaround, we are really looking forward to 1.1.

comment:3 Changed 12 years ago by bill

Hmm, you could try

<div dojoType="dijit.layout.ContentPane" postMixInProperties="console.log('postMixInProperties');">
	Testcontent
</div>

(by the way your code is missing a call to the original postMixInProperties call, if there is one) OR

<script
 function doit() {
   console.log(...);
   dijit.layout.ContentPane.prototype.postMixInProperties.apply(this, arguments);
}
<div dojoType="dijit.layout.ContentPane" postMixInProperties="console.log('postMixInProperties');">
	Testcontent
</div>

comment:4 Changed 12 years ago by bill

Oops, second example above should be:

<script>
 function doit() {
   console.log(...);
   dijit.layout.ContentPane.prototype.postMixInProperties.apply(this, arguments);
}
</script>
<div dojoType="dijit.layout.ContentPane" postMixInProperties="doit">
	Testcontent
</div>

comment:5 Changed 12 years ago by guest

I've also noticed this behavior on IE. Using an attribute to override the method works, but not when using markup. Works on FF.

comment:6 Changed 12 years ago by bill

Component: DijitParser
Milestone: 1.12.0
Owner: set to alex
Summary: IE6/IE7: Extensionpoint defined in markup is not called inside a dijit.layout.ContentPane referenced via href-Attribute of another dijit.layout.ContentPaneIE6/IE7: <script type="dojo/method"> at top of file ignored

IIRC Alex and Karl talked about this problem too; IE just ignores that script tag and apparently Alex that it's not fixable? The workaround is to add another dummy node at the top of the included file, or to use an attribute rather than a <script> tag. Passing to Alex to schedule or close as "wont fix"

comment:7 Changed 11 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:8 Changed 11 years ago by bill

Description: modified (diff)
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.