samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Slideshow images not loading in Internet Explorer when reloading the page and possible solution #467

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Visit a slideshow page in IE 8 WinXP Sp2 eg:
http://www.livablelandscape.com
and the slideshow appears as expected.

If you hit the page refresh button the images do not appear and the spinner 
never disappears.

This seems to be caused by the loadImage function expecting the browser to 
generate a load event on the image which does not necessarily happen for cached 
images on IE 8.

The following change to loadImage seems to address the problem:

    function loadImage(num){
         // check that stack is not empty and we haven't alreay loaded 3 images    
         if(stackLength > 0 && num <= 3) { 
            var img = new Image(); 
            img.src = stack.shift();
            stackLength--;
            // wait to append image until the load is complete
            jQuery( img ).one('load', function() { appendImage(img, num); }).each(function(){
                // for if it is already cached on IE
                if(this.complete) jQuery(this).trigger("load"); 
            });
         }
    }

Original issue reported on code.google.com by it.maur...@gmail.com on 3 Feb 2012 at 7:59

GoogleCodeExporter commented 8 years ago
Sounds reasonable,

why do I catch this not on my demo page : http://nextgen-gallery.com/slideshow/ 
,
I tried to find the difference between your and mine page.

Do you see the same issue when you look at my page with IE8 ? 
I've tested here with IE9 and switch to IE 8 Compat mode

Original comment by alex.cologne on 5 Feb 2012 at 4:55

GoogleCodeExporter commented 8 years ago
Just tested in IE 8, and I can reconfirm the bug on the test page you linked 
to. Thanks for the link by the way, I didn't know how to test in windows as I 
have my developer environment in Linux.

Original comment by kristian...@gmail.com on 5 Feb 2012 at 6:54

GoogleCodeExporter commented 8 years ago
Just to add a bit more. I can also see that the link to the version the 
original poster links to the problem is gone.

Original comment by kristian...@gmail.com on 16 Feb 2012 at 8:55

GoogleCodeExporter commented 8 years ago
I think that is because I changed it locally with the fix i proposed...
I can put up another sample site if that would help.

Original comment by it.maur...@gmail.com on 16 Feb 2012 at 11:42

GoogleCodeExporter commented 8 years ago
no no, you mentioned in the first post that you had made the changes locally. 
So basically I confirmed that the problem exists in the current code, and you 
fix removed the problem

Original comment by kristian...@gmail.com on 17 Feb 2012 at 5:37

GoogleCodeExporter commented 8 years ago
I updated http://nextgen-gallery.com/slideshow/ with your bugfix, here it looks 
good (also the older version was fine) Please check this at your side

Original comment by alex.cologne on 17 Feb 2012 at 3:52

GoogleCodeExporter commented 8 years ago
Fixed in r1069

Original comment by alex.cologne on 17 Feb 2012 at 3:55

GoogleCodeExporter commented 8 years ago
Looks fine now.

Original comment by kristian...@gmail.com on 17 Feb 2012 at 6:03

GoogleCodeExporter commented 8 years ago
thanks for great plugin, it's work for me in ie 7 also.

Original comment by ruslyros...@gmail.com on 3 Mar 2012 at 10:30