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:
cb3a9c1
)
Only set height/width if it's a non-negative number (don't set it to 0).
author
jeresig
<jeresig@gmail.com>
Thu, 9 Sep 2010 20:34:15 +0000
(16:34 -0400)
committer
jeresig
<jeresig@gmail.com>
Thu, 9 Sep 2010 20:34:15 +0000
(16:34 -0400)
src/css.js
patch
|
blob
|
history
diff --git
a/src/css.js
b/src/css.js
index
dd0ca4e
..
b95eb47
100644
(file)
--- a/
src/css.js
+++ b/
src/css.js
@@
-123,7
+123,11
@@
jQuery.each(["height", "width"], function( i, name ) {
set: function( elem, value ) {
// ignore negative width and height values #1599
- return Math.max( parseFloat(value), 0 ) + "px";
+ value = parseFloat(value);
+
+ if ( value >= 0 ) {
+ return value + "px";
+ }
}
};
});