Limit the scope of the CSS 'auto' change to just height/width. Fixes #7293.
[jquery.git] / src / css.js
index 0f14914..1fbee3f 100644 (file)
@@ -177,7 +177,7 @@ jQuery.each(["height", "width"], function( i, name ) {
                                        }
 
                                        if ( val != null ) {
-                                               return val;
+                                               return val === "" ? "auto" : val;
                                        }
                                }
 
@@ -252,7 +252,7 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
                        }
                }
 
-               return ret === "" ? "auto" : ret;
+               return ret;
        };
 }