Fix for the IE image loading problem (the one that results in a small lightwindow on the first click)

Subscribe to Fix for the IE image loading problem (the one that results in a small lightwindow on the first click) 3 post(s), 2 voice(s)

 
Avatar Jaryl 2 post(s)

Guys, this is the fix you’ve been waiting for.

Problem:
The problem only occurs in production (and only on IE), so don’t try to recreate it locally. When clicking on a lightwindow image, the frame is shown while the image is loading. However, the frame resizes to its minimum size and does not change when the image is fully loaded. This problem disappears when trying to display it a second time because the image is already loaded into the cache.

Apparently, others have found the fix, but the code is mangled and cannot be read or copy-pasted. Therefore, in doing some research, I’ve come up with what I think closely resembles the original fix.

The Fix:
Starting at line 1219, replace with the main if statement with this code

 
Avatar mdmick 12 post(s)

Hey Jaryl:

I’ve had this problem for awhile and it was driving me nuts.

Thanks for the fix but I can’t get it to work. I replaced line 1219, and only line 1219, with your code but IE7 presents a white screen with the image in the upper left corner. What am I doing wrong? Maybe you could show your code within lightwindow.js in case I am missing something. TIA.

Martin

 
Avatar Jaryl 2 post(s)

Hey mdmick,

Sorry for the late reply. But if you’re still having the same problem and haven’t given up using lightwindow, here’s the entire code block that I’ve used: http://pastie.caboo.se/175637

Or you could grab the file that I’m using in production, http://www.fta.com.sg/javascripts/lightwindow.js and check out the gallery which is using as well.

Unfortunately, I could not find a way to remove the image not found box while the image was loading, which shows up in Opera and IE.