Download & Extend

Lightbox doesn't always find the correct page height in Opera

Project:Lightbox2
Version:6.x-1.9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

The following work-around works for me, and should make it easier to fix the problem:

var Lightbox = Lightbox || {};

Lightbox.oldGetPageSize = Lightbox.getPageSize;

Lightbox.getPageSize = function() {
  var pageSizes = Lightbox.oldGetPageSize();
  pageSizes[1] = Math.max(
    Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
    Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
    Math.max(document.body.clientHeight, document.documentElement.clientHeight)
  );
  return pageSizes;
}

Comments

#1

To reproduce the issue, use Opera 11 (I used Opera 11.51 on Windows 7) go to:

http://ndla.no/en/node/9166?fag=42&tema=56266&meny=171

click on "ANNE SCOTT HAGEN", a lightbox will open. Scroll down to the bottom of the page.

The bug on the url mentioned above will be fixed with the above workaround on October 7th, so you'll have to check it out before October 7th...

nobody click here