From 03512f50601dc642ee9eb1c058dfdba3356a8fa8 Mon Sep 17 00:00:00 2001 From: James Wheare Date: Mon, 9 Feb 2009 07:21:02 +0800 Subject: [PATCH] Fix for http://prototype.lighthouseapp.com/projects/8886/tickets/543. Don't switch fixed position elements to absolute in Element.getDimensions Signed-off-by: Sam Stephenson --- src/dom/dom.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 4dbf088..2bd17ed 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -441,7 +441,8 @@ Element.Methods = { var originalPosition = els.position; var originalDisplay = els.display; els.visibility = 'hidden'; - els.position = 'absolute'; + if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari + els.position = 'absolute'; els.display = 'block'; var originalWidth = element.clientWidth; var originalHeight = element.clientHeight;