]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Added check to not allow 0 height on empty panels causing height issues...
authorkborchers <k_borchers@yahoo.com>
Wed, 18 May 2011 14:54:36 +0000 (10:54 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 18 May 2011 14:54:36 +0000 (10:54 -0400)
ui/jquery.ui.accordion.js

index 0cc1f9e2abac5f7378cce1073db71660b0ddbd42..c6b33befb8cc2dc4e9577320451eac10587bf9c8 100644 (file)
@@ -486,9 +486,11 @@ $.extend( $.ui.accordion, {
                        $.each( fxAttrs, function( i, prop ) {
                                hideProps[ prop ] = "hide";
 
-                               var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\d+-.]+)(.*)$/ );
+                               var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\d+-.]+)(.*)$/ ),
+                                       // work around bug when a panel has no height - #7335
+                                       propVal = prop === "height" && parts[ 1 ] === "0" ? 1 : parts[ 1 ];
                                showProps[ prop ] = {
-                                       value: parts[ 1 ],
+                                       value: propVal,
                                        unit: parts[ 2 ] || "px"
                                };
                        });