r3038 committed - accordion: fix for #4754; related tests were failing before, fixed the...
Revision: 3038
Author: joern.zaefferer
Date: Thu Aug 6 11:44:36 2009
Log: accordion: fix for #4754; related tests were failing before, fixed
them, too (checked to correct sizes in Firebug)
http://code.google.com/p/jquery-ui/source/detail?r=3038
Modified:
/trunk/tests/unit/accordion/accordion_options.js
/trunk/ui/ui.accordion.js
=======================================
--- /trunk/tests/unit/accordion/accordion_options.js Fri Jul 3 14:05:22
2009
+++ /trunk/tests/unit/accordion/accordion_options.js Thu Aug 6 11:44:36
2009
@@ -55,16 +55,16 @@
test("{ autoHeight: true }, default", function() {
$('#navigation').accordion({ autoHeight: true });
- equals( $('#navigation > li:eq(0) > ul').height(), 112 );
- equals( $('#navigation > li:eq(1) > ul').height(), 112 );
- equals( $('#navigation > li:eq(2) > ul').height(), 112 );
+ equals( $('#navigation > li:eq(0) > ul').height(), 126 );
+ equals( $('#navigation > li:eq(1) > ul').height(), 126 );
+ equals( $('#navigation > li:eq(2) > ul').height(), 126 );
});
test("{ autoHeight: false }", function() {
$('#navigation').accordion({ autoHeight: false });
- equals( $('#navigation > li:eq(0) > ul').height(), 80 );
- equals( $('#navigation > li:eq(1) > ul').height(), 112 );
- equals( $('#navigation > li:eq(2) > ul').height(), 48 );
+ equals( $('#navigation > li:eq(0) > ul').height(), 90 );
+ equals( $('#navigation > li:eq(1) > ul').height(), 126 );
+ equals( $('#navigation > li:eq(2) > ul').height(), 54 );
});
test("{ clearStyle: false }, default", function() {
=======================================
--- /trunk/ui/ui.accordion.js Thu Jul 30 17:23:41 2009
+++ /trunk/ui/ui.accordion.js Thu Aug 6 11:44:36 2009
@@ -222,7 +222,7 @@
} else if ( o.autoHeight ) {
maxHeight = 0;
this.headers.next().each(function() {
- maxHeight = Math.max(maxHeight, $(this).outerHeight());
+ maxHeight = Math.max(maxHeight, $(this).height());
}).height(maxHeight);
}