Side navigation
#1320 closed bug (fixed)
Opened June 25, 2007 03:48PM UTC
Closed September 27, 2007 03:23PM UTC
Last modified March 15, 2012 04:32PM UTC
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.
Attachments (0)
Change History (6)
Changed July 12, 2007 08:15PM UTC by comment:1
Changed July 12, 2007 08:22PM UTC by comment:2
Replying to [comment:1 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
Changed July 12, 2007 08:33PM UTC by comment:3
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].
Changed July 27, 2007 06:55PM UTC by comment:4
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.
Changed July 27, 2007 06:55PM UTC by comment:5
owner: | → john |
---|---|
status: | reopened → new |
Changed September 27, 2007 03:23PM UTC by comment:6
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.