From fd5b67e0212ba04189d9f735b6225c4ed181c0d8 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 14 Apr 2010 17:33:11 +0200 Subject: [PATCH] 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 --- horde/js/prototype.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.11.0