Every time the Lightbox overlay shows up in Firefox (I tested it with FF 3.5.2), I am getting both horizontal and vertical scrollbars appearing on the page. This gets particularly annoying when I am using the keyboard to navigate through the images. For example when I press the right arrow, two things happen:
1) Lightbox shows the next image in line.
2) The browser thinks I am trying to scroll the page to the right and the whole overlay moves over.

I have no problems like that in IE.

CommentFileSizeAuthor
#3 patch.txt2.5 KBoerpli
#2 lightbox2-6.x-1.9.patched.tar_.gz105.8 KBoerpli

Comments

oerpli’s picture

thats exactly the problem i had.
actually i try to rewrite the overlay- behaviour as it sucks at the moment.

oerpli’s picture

StatusFileSize
new105.8 KB

i did change some parts in the "js/lightbox.js" and in the "css/lightbox.css" files.

1. The overlay- CSS- attributes (height: 100px; width: 100px; top/left: 0px; position: fixed;)

2. If the lightbox starts, "$('body').css('overflow','hidden');" disables the scrollbars and the #lightbox gets some little adjustments.

3. If you zoom in (enlarge the picture) body overflow will be set to auto again and the lightbox's css gets again.

4. After killing the lightbox the overflow will be also set to auto.

Maybe i've forgot some things and the structure may be very ugly, as i'm new to drupal and my programming- style is... somehow "different" :)

Remaining problems:
If the picture is enlarged, there's about 20px margin on the top, left and bottom, but the margin-right does not work correctly.
No idea why.

I hope it works for you, i've only debugged it with ff and opera as i'm on linux here.

Edit: Imho it also improves the behaviour of the lightbox slightly, maybe somebody else has a differing opionion here...

oerpli’s picture

Status: Active » Fixed
StatusFileSize
new2.5 KB

Here's the patch (with git or something like this... no idea what it's called.

oerpli’s picture

Oh, btw, the "top: 60px" or whatever is wrong, maybe it's better if you remove this.
No idea.

stella’s picture

Status: Fixed » Closed (duplicate)