Skip to content

fixes #12282, sometimes IE10 and lower have document.readyState == "interactive" way too early #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mikesherov
Copy link
Member

With tests! Conclusive, repeatable proof!

Running "compare_size:files" (compare_size) task
Sizes - compared to master
    258460      (+121)  dist/jquery.js                                         
     92618        (-7)  dist/jquery.min.js                                     
     33134        (+1)  dist/jquery.min.js.gz   

// IE10 and lower don't handle "interactive" properly... use a weak inference to detect it
// hey, at least it's not a UA sniff
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
if ( document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading" ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's gotta be a better way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all ears.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently no good way I can see to detect that IE9 and IE10 have fired interactive too early. Although, now that there's this repeatable test case, perhaps you can poke around too. For now, this seems to be the only way (although I agree it's dirty).

@dmethvin dmethvin closed this in 0f553ed Aug 20, 2012
@peterschmidler
Copy link

Thanks mike! I was getting gray hairs by this one...

@mikesherov
Copy link
Member Author

@peterschmidler Thanks. Keeping my fingers crossed that nothing pops up in chrome or Firefox!

@danjagnow
Copy link

This fix was just what I needed after upgrading to 1.8.0. Looking forward to seeing it in a stable jQuery release (and NuGet package, in my case). Thanks, Mike!

mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
nvenegas pushed a commit to skatejs/skatejs that referenced this pull request Jun 19, 2015
ihilt added a commit to ihilt/youmightnotneedjquery that referenced this pull request May 18, 2017
Change readyState example to handle IE9+ weirdness.

See pull request: jquery/jquery#901
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants