#1320 closed bug (fixed)
In IE, $(document).ready fires too soon.
Reported by: | steveh | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | event | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I am developing a large RIA application that loads many javascript and CSS files into a very large DOM. In IE6 and IE7, jQuery is firing the ready event when the document goes to 'interactive' state rather than waiting for 'complete' state.
I believe that the problem is with the following line of code (at line 1500 in 1.1.2 uncompressed revision 1465):
if ( this.readyState != "complete" ) return;
Here, 'this' refers to the script tag which does have a state of 'complete', however the debugger shows that 'document.readyState' still has the state 'interactive.'
When I change this line to read:
if ( document.readyState != "complete" ) return;
Then the problems that I am seeing in my code go away.
Change History (6)
comment:1 follow-up: 2 Changed 16 years ago by
comment:2 Changed 16 years ago by
Replying to cjscott69:
Confirmed this bug and fix (thanks!) as well. This is also a bug in 1.1.3.
That should be 1.1.3.1
comment:3 Changed 16 years ago by
Component: | core → event |
---|---|
Milestone: | 1.2 → 1.1.4 |
Resolution: | → fixed |
Status: | new → closed |
Version: | 1.1.2 → 1.1.3 |
Fixed in SVN rev [2332].
comment:4 Changed 16 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Ok, so this fixed the problem, but actually made document ready fire far too late, this needs to be resolved.
comment:5 Changed 16 years ago by
Owner: | set to john |
---|---|
Status: | reopened → new |
comment:6 Changed 15 years ago by
Milestone: | 1.1.4 → 1.2.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | 1.1.3 → 1.2.1 |
Fixed in SVN rev [3484].
Confirmed this bug and fix (thanks!) as well. This is also a bug in 1.1.3.