Skip to content

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 into
yui:masterfrom
scottschiller:ie9-quirksmode-script-onload-fix
May 9, 2012
Merged

Fix IE 9 load regression (seen on flickr.com) with YUI 3.5 and IE 9 on quirks-mode pages#130
yuibuild merged 1 commit into
yui:masterfrom
scottschiller:ie9-quirksmode-script-onload-fix

Conversation

@scottschiller

Copy link
Copy Markdown
Contributor

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.

…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.
@travisbot

Copy link
Copy Markdown

This pull request passes (merged 050ebaa into 990e9c8).

@sdesai

sdesai commented May 8, 2012

Copy link
Copy Markdown
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).

@scottschiller

Copy link
Copy Markdown
Contributor Author

Excellent. I plan to apply this as patch to our copy of 3.5, so we can upgrade Flickr in the meantime.
I think my change is correct, but let me know if you find any holes in my logic.

@ghost ghost assigned davglass May 8, 2012
@davglass

davglass commented May 8, 2012

Copy link
Copy Markdown
Member

I've already merged this in locally and rebuilt the files. It will go into the next build that I can push to.

@davglass davglass closed this May 8, 2012
@davglass davglass reopened this May 8, 2012
@davglass

davglass commented May 8, 2012

Copy link
Copy Markdown
Member

Meant to just comment on it l)

@travisbot

Copy link
Copy Markdown

This pull request passes (merged 050ebaa into 990e9c8).

@yuibuild yuibuild merged commit 050ebaa into yui:master May 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants