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:
335e0a3
)
Limit the scope of the CSS 'auto' change to just height/width. Fixes #7293.
author
jeresig
<jeresig@gmail.com>
Wed, 3 Nov 2010 22:57:22 +0000
(18:57 -0400)
committer
jeresig
<jeresig@gmail.com>
Wed, 3 Nov 2010 22:57:22 +0000
(18:57 -0400)
src/css.js
patch
|
blob
|
history
test/unit/effects.js
patch
|
blob
|
history
diff --git
a/src/css.js
b/src/css.js
index
0f14914
..
1fbee3f
100644
(file)
--- a/
src/css.js
+++ b/
src/css.js
@@
-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;
};
}
diff --git
a/test/unit/effects.js
b/test/unit/effects.js
index
8facb4f
..
74b336f
100644
(file)
--- a/
test/unit/effects.js
+++ b/
test/unit/effects.js
@@
-6,7
+6,7
@@
test("sanity check", function() {
});
test("show()", function() {
- expect(27);
+ expect(28);
var hiddendiv = jQuery("div.hidden");
@@
-14,6
+14,10
@@
test("show()", function() {
equals( hiddendiv.css("display"), "block", "Make sure a pre-hidden div is visible." );
+ var div = jQuery("<div>").hide().appendTo("body").show();
+
+ equal( div.css("display"), "block", "Make sure pre-hidden divs show" );
+
QUnit.reset();
hiddendiv = jQuery("div.hidden");