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 <sam@37signals.com>
This commit is contained in:
James Wheare 2009-02-09 07:21:02 +08:00 committed by Sam Stephenson
parent ceb7b72621
commit 03512f5060
1 changed files with 2 additions and 1 deletions

View File

@ -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;