Jquery 1.6.2 Crashes IE8 Tabs
Hello fellow developers,
I am a little stumped on this one as I have been using JQuery 1.6.2 with no issues until three days ago. (There was a service pack update at some point around this time)
Anyway the issue is as follows:
I am coding in HTML5 and have been for some time now, no problems there, but three days ago I began to update some of the older websites. This particular website (and some others) required an update to the JQuery version so I decided to call on the hosted 1.6.2 version from Google.
As soon as I did this my website's began to crash my IE8 tabs. On the website I am working on, my cycle plugin no longer works and for some strange reason my UL list now goes white when I hover over the links!
I started pulling out my hair and thought maybe IE8 was have compatibility issues with HTM开发者_如何学PythonL5, so I went back and changed all the coding, getting rid of HTML5 elements and then even going back to xhtml doctype. It still continued.
I then went through the plugin code, trying to find others who had experienced the same problems. Nothing wrong there.
Eventually I took out the Jquery and the site went back to normal and didn't crash the tabs!
I have since replaced the 1.6.2 version with an older version I have laying around 1.4.3 and that seems to work fine!?
Is anyone else having issues with 1.6.2 and IE8 - Like always in every other browser I can get my hands on the site performs perfectly with whatever version of JQuery I call upon.
Thanks in advance.
Kind Regards
Richard
The jQuery developers have fixed the issue. The associated bug item is #9823 and the commit is 5c4a9cc001fcd803efa65ff95571c72cbdafbe69. Works for me.
The Solution
It is an issue with jQuery version 1.6.2 (which was the latest version at time of development). Luckily they fixed the issue, so the fix on your end is simple… Update to the latest version of jQuery.
I had a very similar issue with
- jQuery 1.6.2
- a facebook like button
- and a background image on the body element
As jjmontes stated above, removing / changing any of the above will solve the issue. Changing the IE mode to a compatibility mode did not resolve the issue, probably easiest way of avoiding this problem is to use a newer version of jQuery. Demo / test case (since the above is not online anymore) can be seen here.
I think I have a good test case example here of this behavior:
http://onpoint.wbur.org/op_full.html
This page is running the latest Jquery, a Disqus script and not much else.
If you visit the page, it won't crash. But refreshing the page will cause IE8 to crash.
Fixes:
Any of the following will fix the crash:
- Remove Jquery
- Remove Disqus
- Remove the BODY style declaration altogether
- Remove just the background image call and instead use BG color
- Move the style block to below the Jquery call
So there's some interaction between the markup that the disqus script is pulling into the DOM, Jquery and the BODY css rule at the top.
Very strange but there's definitely a bug here, either in Disqus' markup or Jquery.
精彩评论