Having Trouble with Lightbox 2.03.3 in Safari 3.x?
2008-02-20 23:32:21
Well I know I sure was. I came across a bug where images could be displayed smaller or bigger than they should depending on what you clicked on before that image.
I've patched the lightbox.js to make this bug go away. In lighbox class' changeImage method I modified the imgPreloader.onload function.
...
// once image is preloaded, resize image container
imgPreloader.onload=function(){
Element.setSrc('lightboxImage', imageArray[activeImage][0]);
//unimatrixZxero edited fist at 2008-02-20 23:25
//adding these attr setters for bug fix in Safari 3.x
Element.setWidth('lightboxImage', imgPreloader.width);
Element.setHeight('lightboxImage', imgPreloader.height);
myLightbox.resizeImageContainer(imgPreloader.width,
imgPreloader.height);
//clear onLoad, IE behaves irratically with animated gifs otherwise
imgPreloader.onload=function(){};
}
...
digg/unimatrixZxero