Opened 12 years ago

Closed 12 years ago

#2975 closed defect (fixed)

IE7: dojo does not load from local filesystem when isDebug: true

Reported by: guest Owned by: Jared Jurkiewicz
Priority: high Milestone:
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Dojo version:
profile=base, built from current 0.9 development sources of revision 8529

Browser:
IE7 only, does not occur with IE6, Firefox 2.0

Steps to reproduce:

  1. Save the attached file, isDebug_true.htm, to the local filesystem
  2. Build dojo, place it into dojo subfolder; place firebug files into dojo/_base/firebug/
  3. Launch IE7, open the file; if asked, allow the script to run
  4. The page prints "dojo.byId: undefined"

Expected result:

  1. "dojo.byId: function("...

This behavior is caused by what is already described in ticket #1711, but that one is against dojo 0.4/0.5. The following line in hostenv_browser.js throws an error, preventing further loading of dojo:

dojo.require("dojo._base.firebug.firebug");

Workaround:
Turning off "Native XMLHttp support" in advanced options of IE7, as suggested by ticket #1711, is a workaround.

Patch:
Patch to fix the issue against dojo 0.9, in /_base/loader/hostenv_browser.js, after the following line: (line 78, as of rev.8529)

			try{ http = new XMLHttpRequest(); }catch(e){}

add something like the following lines:

			if(dojo.isIE && location.protocol=="file:"){
				http = null;
			}

Best regards,
Konstantin Kolinko

Attachments (1)

isDebug_true.htm (239 bytes) - added by guest 12 years ago.
Demonstrates the problem.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by guest

Attachment: isDebug_true.htm added

Demonstrates the problem.

comment:1 Changed 12 years ago by guest

Correction:
It would be more efficient just to avoid that

try{ http = new XMLHttpRequest(); }catch(e){}

call in the above case, instead of "null"ing its result. Also, '==' in strings comparison can be replaced with '==='.

Konstantin Kolinko

comment:2 Changed 12 years ago by Adam Peller

Owner: changed from anonymous to Jared Jurkiewicz

comment:3 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

Fixed in #1990

Note: See TracTickets for help on using tickets.