Fix IE 9 load regression (seen on flickr.com) with YUI 3.5 and IE 9 on quirks-mode pages#130
Merged
yuibuild merged 1 commit intoMay 9, 2012
Conversation
…s on a quirks mode page or is in a mode other than IE 9 standards - as a result, <script>.onload does not fire, only <script>.onreadystatechange works. Side note: build.sh was ran before this commit, so some other lines appear to have been updated as a result.
Contributor
|
Thanks Scott. We'll fit this into the next release. Here's a report for it: http://yuilibrary.com/projects/yui3/ticket/2532246 (it came in too late for inclusion in 3.5.1, given the quirksmode edge case). |
Contributor
Author
|
Excellent. I plan to apply this as patch to our copy of 3.5, so we can upgrade Flickr in the meantime. |
Member
|
I've already merged this in locally and rebuilt the files. It will go into the next build that I can push to. |
Member
|
Meant to just comment on it l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We flipped YUI 3.5 and noted a report of IE 9 users not getting YUI3 JS modules loading.
It appears that when IE 9 is on a quirks mode page or has manually been flipped to a mode other than IE 9 standards, <script>.onload does not fire, only <script>.onreadystatechange works. (We're not proud of the fact we have a few quirks-mode pages still kicking around, but that's a story for another time.)
YUI appears to have logic that applies onreadystatechange for IE 6, 7 and 8, but did not also include IE 9 (and potentially IE 10+?) when not in standards mode.
Minimal test case, should illustrate current bug with 3.5.1 (view under IE 9 - note if you switch rendering modes to IE 9 standards, things will start working):
https://gist.github.com/2632058
If you wanted to be paranoid, you could probably get away with attaching both onreadystatechange + onload on <script> and clear/remove both events when one fires.
Side note: build.sh was ran before this commit, so some other lines appear to have been updated as a result.
Second note: I'm a pull request n00b, so apologies if I missed any expected things.
As always, thanks for YUI. It's excellent and we're big fans.