I have several problems with the Lightbox2 modul.
All tests have been made on a Win7 32Bit system.
Firefox 3.6:
The overlay is too width and causes a horizontal scrollbar when there is a vertical scrollbar. I think this a knwon issue (found a post about this, but can't find it at the moment. AFAIR it has something to do with window.innerwidth).
Opera 10.10:
Here the problem seems to be that the #lightbox div isn't positioned correct. Instead of beeing positioned with respect to the actual (scroll) position of the window, it's always positioned on the top of the viewport (0,0) which leads to being to short as far as you have scrolled down the page already.
Safari 4.0.3, IE 8 (and IE 7 compatible modus) all work fine.
Can anybody confirm this behaviour?
Does anybody know a solution for these problems?
Or can at least anybody give me a hint where to search for the problems in the code?
Thanks for your help.
Gunther
Addition 1:
And here is the answer to the described problems:
I managed to solve the width problem in Firefox, which is caused by not respecting scrollbar width when determing window width, by adding a small 'hack' in lightbox.js!
I changed the part where the additional css is added to the overlay in // Adjust the page overlay size. round line 657 and following.
I replaced the line $('#overlay').css({'height': pageHeight + 'px', 'width': '100%'}); with
if ($.browser.mozilla) {
$('#overlay').css({'height': pageHeight + 'px', 'width': '100%'});
}
else {
$('#overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'});
}So there will be no more horizontal scrollbar in FF (at least in 3.6).
The problem with Opera is caused by a bug in Opera which appears as soon as the html and/ or body element(s) has/ have a given height in CSS (most probably you'll have a rule like "html, body {height: 100%;}" or just a little more than 100% for always having a vertical scrollbar).
As soon as you remove that rule from your CSS, the Lightbox is working as intended.
I still haven't found another solution for this problem, yet. So if anyone else knows how to avoid this problem and having the CSS rule, please let us know!
Comments
use the module issue
it's better if you use the module issue than the forum for this, then it's more likely that the module developer becomes aware of the issue as well as others using the lightbox module.
OK, I'll do so ... ;-)
OK, I'll do so ... ;-)