Opened 9 years ago

Closed 9 years ago

#16609 closed defect (wontfix)

"dojo/require" fails when dojo config specifies async:false in IE7 and IE8

Reported by: neville1355 Owned by: neville1355
Priority: undecided Milestone: tbd
Component: Parser Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:


See bug 16608

I've narrowed down the bug with pulling in "dojox/mvc/at" via script tag require to the fact that I had configured my page as async:false

<script type="dojo/require"> at:"dojox/mvc/at" </script>

"at" will remain undefined if dojo is configured to be synchronous. I've only been able to create this problem on IE7 and IE8; other browsers appear to be unaffected.

Attachments (1)

dojobug.html (1.4 KB) - added by neville1355 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by neville1355

I was able to fix my problem by moving the <script type="dojo/require"> to the end of the page. It looks like the script tag was removed from the DOM by IE before the parser had a chance to query it...

e.g. Before: <div id="${id}_ModuleA" >

<script type='dojo/require'>


</script> <div data-dojo-type="dijit/TitlePane" title="Module A">

<!-- Bindings here -->



After: <div id="${id}_ModuleA" >

<div data-dojo-type="dijit/TitlePane" title="Module A">

<!-- Bindings here -->

</div> <script type='dojo/require'>




comment:2 Changed 9 years ago by bill

Owner: changed from bill to neville1355
Status: newpending

You didn't attach a test case but it sounds like you are talking about the famous unsolvable problem where IE has trouble with script tags at the very beginning of a document. I didn't think that happened in IE8 too though.

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser (i.e. not PHP, JSP, etc.)

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.


Changed 9 years ago by neville1355

Attachment: dojobug.html added

comment:3 Changed 9 years ago by neville1355

Status: pendingnew

Attachment (dojobug.html) added by ticket reporter.

comment:4 Changed 9 years ago by neville1355

Added the test case as requested.

Tested in IE10 under IE8 mode. Confirmed that the "script/require" block wasn't being executed.

Moving the block to the end of the template worked.

I had to encapsulate my widget within a content pane to recreate the bug, so it may be related to that.

comment:5 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

OK, I reproduce on IE8 and show it working on IE9. It's disappointing that this is failing even on IE8, but anyway it does seem like a variation on the known IE issue I mentioned earlier, about problems when scripts are at the top of the file. Except in this case it's not the top of the file but rather the top of the template you are parsing via:

var template = document.getElementById("template");
var contentPane = registry.byId("myPane");
contentPane.set('content', template.outerHTML);

So, I don't know anyway to fix this other than the workaround you already suggested.

Note: See TracTickets for help on using tickets.