Skip to content

Commit

Permalink
Accordion: Added check to not allow 0 height on empty panels causing …
Browse files Browse the repository at this point in the history
…height issues on non-empty panels. Fixed #7335 - Accordion: Incorrect size when a panel is empty
  • Loading branch information
kborchers authored and scottgonzalez committed May 18, 2011
1 parent e0fafbb commit 4ff8d90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/jquery.ui.accordion.js
Expand Up @@ -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"
};
});
Expand Down

0 comments on commit 4ff8d90

Please sign in to comment.