Hello,
As it is mentionned in this issue https://support.microsoft.com/en-us/kb/2684777, the scrollHeight property of an iframe may return a value smaller than expected.
This cause a problem in lightbox.js plugin while trying to calculate the overlay height after zooming in an image which has a big height (~4500px).
His is the code that use scrollHeight:

getPageSize : function() {

var xScroll, yScroll;

if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
}
else if (document.body.scrollHeight > document.body.offsetHeight) { // All but Explorer Mac.
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
}
else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari.
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}

var windowWidth, windowHeight;

if (self.innerHeight) { // All except Explorer.
if (document.documentElement.clientWidth) {
windowWidth = document.documentElement.clientWidth;
}
else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode.
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
}
else if (document.body) { // Other Explorers.
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// For small pages with total height less than height of the viewport.
if (yScroll < windowHeight) {
pageHeight = windowHeight;
}
else {
pageHeight = yScroll;
}
// For small pages with total width less than width of the viewport.
if (xScroll < windowWidth) {
pageWidth = xScroll;
}
else {
pageWidth = windowWidth;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
},
Thanks,

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mouna Hammami created an issue. See original summary.

Mouna Hammami’s picture

Hi,
This patch can solve this issue.
it works for D7 version.

joseph.olstad’s picture

Hi Mouna, thanks for the patch, which version of Internet Explorer should I test this patch on?

joseph.olstad’s picture

Status: Active » Postponed (maintainer needs more info)
Mouna Hammami’s picture

hi joseph,

I had this issue when i worked with IE11.

joseph.olstad’s picture

Status: Postponed (maintainer needs more info) » Active
joseph.olstad’s picture

Status: Active » Needs review
pifagor’s picture

Status: Needs review » Reviewed & tested by the community

+1

voleger’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks, fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.