From: Jan Schneider Date: Wed, 14 Apr 2010 15:33:11 +0000 (+0200) Subject: Fix width calculation of hidden elements (fixes redbox positioning). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fd5b67e0212ba04189d9f735b6225c4ed181c0d8;p=horde.git Fix width calculation of hidden elements (fixes redbox positioning). See https://prototype.lighthouseapp.com/projects/8886/tickets/1034-layouts-getwidth-calculating-incorrectly-with-hidden-elements-and-auto-width#ticket-1034-1 --- diff --git a/horde/js/prototype.js b/horde/js/prototype.js index 99f454a07..200a3437f 100644 --- a/horde/js/prototype.js +++ b/horde/js/prototype.js @@ -5173,8 +5173,8 @@ Object.extend(Element.ClassNames.prototype, Enumerable); // Either way, it means the element is the width it needs to be // in order to report an accurate height. newWidth = getPixelValue(width); - } else if (width && (position === 'absolute' || position === 'fixed')) { - newWidth = getPixelValue(width); + } else if (positionedWidth && (position === 'absolute' || position === 'fixed')) { + newWidth = getPixelValue(positionedWidth); } else { // If not, that means the element's width depends upon the width of // its parent.