Issues when user scrolls with scroll wheel

Jun 18, 2009 at 1:45 AM

I noticed that when you have a photo open and the background is grayed out that if you used the scroll wheel to move up and down the page, the gray background and the photo itself would move as well.  I was able to resolve the issue with the gray background by making a change in jquery.lightbox-0.5.css.

Original:

#jquery-overlay {

position: absolute;

top: 0;

left: 0;

z-index: 90;

width: 100%;

height: 500px;

}

Updated:

#jquery-overlay {

position: fixed;

top: 0;

left: 0;

z-index: 90;

width: 100%;

height: 100%;

}

This results in the picture itself still moving up and down the page when scrolling though.  I've tried setting the position for #jquery-lightbox to fixed and giving it a height of 100% like I did with #jquery-overlay and that works initially if I haven't already scrolled down the page before opening up a picture.  If I have scrolled down to click to open a picture that is further down on my page, then the picture opens up lower on the screen only displaying half of it.  Is there some calculation going on in javascript somewhere that is setting the top value of the open picture?