Closed (duplicate)
Project:
Lightbox2
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2009 at 01:59 UTC
Updated:
28 Apr 2009 at 14:42 UTC
The following patch update the getPageSize() function in lightbox.js to match the upstream implementation.
Why does it matters? On firefox mac (at least), the width of the overlay div is consistently too large by the size of the scrollbar. This provoke the apparition of an horizontal sidebar in the browser.
The critical change is:
// For small pages with total width less then width of the viewport.
if (xScroll < windowWidth) {
- pageWidth = windowWidth;
+ pageWidth = xScroll;
}
else {
- pageWidth = xScroll;
+ pageWidth = windowWidth;
}
I know that just above that chunk, the code does the opposite for the height. But *alas* this matches what upstream does (in the latest 2.04 version).
This should also apply to the 6.x version.
| Comment | File | Size | Author |
|---|---|---|---|
| lightbox-getPageSize-fix.patch | 1.67 KB | damien tournoud |
Comments
Comment #1
stella commentedDuplicate of #349843: Arrow Key Navigation causes underlying screen to shift
Comment #2
kuakuak commentedThanks, it worked (6.x), this was also happening in windows and linux. Tested in windows and linux with Firefox 2.0 and 3.0.
Thanks again!!!