Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#7405 closed bug (worksforme)

jQuery.onReady fires before IE is ready to look at document.namespaces

Reported by: echo85@… Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:

Description

Problem comes up in Openlayers and is documented here:

http://stackoverflow.com/questions/1081812/javascript-unspecified-error-in-open-layers

Having an unloaded image triggers it:

<html><body><img src='http://apod.nasa.gov/apod/image/0304/bluemarble2k_big.jpg'/>

<script src="jquery-1.4.3.min.js"></script><script>

$().ready(function(){ document.namespaces; });

</script></body></html>

Here's a patch but it may make things start up more slowly on IE of course:

diff jquery-1.4.3.js jquery-1.4.3.patched.js 890a891

document.namespaces;

Change History (3)

comment:1 Changed 9 years ago by Rick Waldron

Resolution: worksforme
Status: newclosed

Tested in IE 6, 7, 8

http://jsfiddle.net/rwaldron/25xUX/3/

Additionally, you should know that document ready will always fire before images are completely loaded into the browser. document ready simply means that the DOM is parsed and ready to be manipulated.

comment:2 Changed 9 years ago by echo85@…

There is a browser error in vanilla IE 8 with the test case i provided, and there is no browser error in the jsfiddle version.

comment:3 Changed 9 years ago by Rick Waldron

Right, but there is a fundamental difference - yours is using the now out-of-date 1.4.3 and mine is using the 1.4.4rc2. Which means: if it works in the most recent version of the library, then it is marked as "worksforme" - as in... we don't have to chase ghosts trying to find a bug that is already fixed.

Additionally, the file generated by jsFiddle is not much more then what your file was, it just happens to be in an iframe.

Lastly, we require jsFiddles for bug reports - says so on the filing page.

Note: See TracTickets for help on using tickets.