From: kborchers Date: Wed, 18 May 2011 14:54:36 +0000 (-0400) Subject: Accordion: Added check to not allow 0 height on empty panels causing height issues... X-Git-Tag: 1.9m5~6^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ff8d90a825f8335a4dbc8df2539fa08a3fe0add;p=jquery-ui.git Accordion: Added check to not allow 0 height on empty panels causing height issues on non-empty panels. Fixed #7335 - Accordion: Incorrect size when a panel is empty --- diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 0cc1f9e2a..c6b33befb 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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" }; });