Moved unload abort code so that the event is only bound if the xhr transport is used...
[jquery.git] / src / css.js
index 4665fa7..8a83c60 100644 (file)
@@ -177,13 +177,18 @@ jQuery.each(["height", "width"], function( i, name ) {
                                        }
 
                                        if ( val != null ) {
-                                               return val === "" ? "auto" : val;
+                                               // Should return "auto" instead of 0, use 0 for
+                                               // temporary backwards-compat
+                                               return val === "" || val === "auto" ? "0px" : val;
                                        }
                                }
 
                                if ( val < 0 || val == null ) {
                                        val = elem.style[ name ];
-                                       return val === "" ? "auto" : val;
+
+                                       // Should return "auto" instead of 0, use 0 for
+                                       // temporary backwards-compat
+                                       return val === "" || val === "auto" ? "0px" : val;
                                }
 
                                return typeof val === "string" ? val : val + "px";