Element.getStyle() uses getPropertyValue() which works for most style properties, but returns for specific margin and padding properties. (Left, Top, Right, Bottom).
These properties are available from the computed style object if you use the [] operator. This patch tries the [] operator on the style property if getPropertyValue returned nothing.
I've tested this on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5.
This diff is against Prototype v1.5.0_rc0 as downloaded from here:"http://script.aculo.us/dist/scriptaculous-js-1.6.1.tar.bz2"
Index: prototype.js
===================================================================
--- prototype.js (revision 78)
+++ prototype.js (working copy)
@@ -1024,6 +1024,7 @@
if (document.defaultView && document.defaultView.getComputedStyle) {
var css = document.defaultView.getComputedStyle(element, null);
value = css ? css.getPropertyValue(style) : null;
+ value = css && !value ? css[style] : null;
} else if (element.currentStyle) {
value = element.currentStyle[style.camelize()];
}