From 855e27311df5eb4e794528d420af494540ed84c8 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Wed, 19 Mar 2008 14:04:52 +0000 Subject: [PATCH] prototype: Avoid re-extending element in Element#getDimensions. --- CHANGELOG | 2 ++ src/dom.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index daefe8b..563b15e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Avoid re-extending element in Element#getDimensions. [kangax] + * Prevent Hash#toQueryString from serializing objets. [kangax, Tobie Langel] * Fix Event#pointer in IE standard mode. Closes #9920. [kangax, Tobie Langel] diff --git a/src/dom.js b/src/dom.js index 8e8029b..be8ff6e 100644 --- a/src/dom.js +++ b/src/dom.js @@ -434,7 +434,7 @@ Element.Methods = { getDimensions: function(element) { element = $(element); - var display = $(element).getStyle('display'); + var display = element.getStyle('display'); if (display != 'none' && display != null) // Safari bug return {width: element.offsetWidth, height: element.offsetHeight};