git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3394d32
)
Need to also handle the case where 'auto' is being returned, as in Firefox. Follow...
author
jeresig
<jeresig@gmail.com>
Wed, 10 Nov 2010 04:33:18 +0000
(23:33 -0500)
committer
jeresig
<jeresig@gmail.com>
Wed, 10 Nov 2010 04:33:18 +0000
(23:33 -0500)
src/css.js
patch
|
blob
|
history
diff --git
a/src/css.js
b/src/css.js
index
369485e
..
8a83c60
100644
(file)
--- a/
src/css.js
+++ b/
src/css.js
@@
-179,7
+179,7
@@
jQuery.each(["height", "width"], function( i, name ) {
if ( val != null ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
if ( val != null ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
- return val === "" ? "0px" : val;
+ return val === "" || val === "auto" ? "0px" : val;
}
}
}
}
@@
-188,7
+188,7
@@
jQuery.each(["height", "width"], function( i, name ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
- return val === "" ? "0px" : val;
+ return val === "" || val === "auto" ? "0px" : val;
}
return typeof val === "string" ? val : val + "px";
}
return typeof val === "string" ? val : val + "px";