Page 1 of 1
IE9 and thickbox
Posted: Wed Mar 16, 2011 5:42 am
by Moggin
I understand the latest version of IE9 is available for public release.
So I checked my shop, and the opencart demo, and noticed the popup lightbox falls off the screen if the shop is viewed in the latest version (IE9 9.0.8112.16421, win7 64 bit)
lightbox_sunk.png (215.14 KiB) Viewed 7223 times
...anyone else see this?
I only bothered to check because I was looking at a magento store, and their image popup wasn't functioning at all in IE9!
Fancybox seems to be all right in IE9 (checked qphoria's site)
It's not really a bug but thought it worth a mention.
Re: IE9 and thickbox
Posted: Wed Mar 16, 2011 6:23 am
by i2Paq
It is not a bug but an issue with your template because it was build BEFORE IE9 came out

Re: IE9 and thickbox
Posted: Wed Mar 16, 2011 7:29 am
by Moggin
ah yes, you're right! It IS a template issue, thanks i2Paq.
The only problem is, that screenshot is from the Opencart demo store

So the default Opencart template is showing the issue, as well as my shop...
Maybe I'll install Q's
fancybox replacement now....though who cares about IE anyway!

Re: IE9 and thickbox
Posted: Sat Mar 19, 2011 1:54 am
by Moggin
...as a PS, for anyone who cares : it looks like magento users are having
slightly more serious problems with IE9.
A suggested short term fix was to use
Code: Select all
<meta http-equiv="X-UA-Compatible" content="IE=8" />
...so if I start losing sleep over thickbox (
very unlikely), maybe this is a good band-aid
Re: IE9 and thickbox
Posted: Mon Mar 28, 2011 10:53 pm
by leook2001
Hi Moggin, could you tell me how can i fix the problem in detail?
I really want to solve it.
Re: IE9 and thickbox
Posted: Tue Mar 29, 2011 3:50 am
by Moggin
Hi leook2001, well
Qphoria's fancybox mod thread gives detailed instructions for replacing thickbox with fancybox. The thread is a year old, so there are newer versions of fancybox available.
The other option was an idea picked up from
here. This tag
Code: Select all
<meta http-equiv="X-UA-Compatible" content="IE=8" />
is placed right after the <head> tag in your header file (same file the fancybox mod uses). It's meant to emulate IE8 if the user has IE9.
I tried it briefly, and it seemed to fix the problem, but I have not tested it thoroughly - so use at your own risk.

Re: IE9 and thickbox
Posted: Tue Mar 29, 2011 10:38 pm
by leook2001
Thank you, Moggin.
I have add the tag "<meta http-equiv="X-UA-Compatible" content="IE=8" />" to the file.
It seems the problem has been fixed already.
Thank you again!
Re: IE9 and thickbox
Posted: Sun Apr 03, 2011 10:49 am
by disker
The reason thickbox is messing up in IE9 is it is doing a test for IE6 that IE9 doesn't process correctly.
Since IE6 is so old, I figure the best thing to do is just remove this test as it is no longer needed. Look for the following lines around line number 283. (Yours may be different as I have modified my thickbox code a bit, but it will be very close!)
if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function')) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
Take away the first and third lines of this bunch leaving you with the following line:
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
The if statement first checks to see if you are using IE. If you are, it checks the typeof XMLHttpRequest to see if the version of IE can handle XML - which IE6 can not. It would return false to the second part of the test and not allow the marginTop to be changed.
IE9 returns true for the first test as all IE browsers do, but it also returns true to the second test the same as IE7 and IE8, but still doesn't allow the change to marginTop to execute. Why? I don't know. The fix is to remove the test altogether. If someone is STILL using IE6, they REALLY need to upgrade.
If you want to keep this check in, modify it to use a different way to check for IE6. How you do is up to you.
I hope that this helps you guys out! I registered just to post this for you!

Re: IE9 and thickbox
Posted: Mon Apr 04, 2011 10:50 pm
by Moggin
hey disker, I really appreciate your registering to help us out! I will take a close look at this solution. Thanks!
Re: IE9 and thickbox
Posted: Sat Apr 30, 2011 8:38 pm
by JNeuhoff
In case anybody else has problems with Thickbox, here is a patched version of the latest 3.1 version which works fine on my site, including IE9.
Re: IE9 and thickbox
Posted: Thu May 05, 2011 12:58 am
by tdaubs
JNeuhoff wrote:In case anybody else has problems with Thickbox, here is a patched version of the latest 3.1 version which works fine on my site, including IE9.
thickbox.zip
Thanks JNeuhoff! Your fix worked for me too. Thanks for sharing.
Re: IE9 and thickbox
Posted: Tue Dec 20, 2011 7:49 am
by bobrus
BIG Thanks JNeuhoff! Your fix worked for me too. Thanks for sharing.
Re: IE9 and thickbox
Posted: Thu Mar 22, 2012 11:30 pm
by Johnathan
Thanks JNeuhoff -- had this issue for one of my clients, and your fix worked right away.
Re: IE9 and thickbox
Posted: Wed Aug 29, 2012 6:48 am
by User1632
A big thanks from me as well: Problem solved!