Skip to content

Commit 4ff8d90

Browse files
kborchersscottgonzalez
authored andcommitted
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
1 parent e0fafbb commit 4ff8d90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ui/jquery.ui.accordion.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,11 @@ $.extend( $.ui.accordion, {
486486
$.each( fxAttrs, function( i, prop ) {
487487
hideProps[ prop ] = "hide";
488488

489-
var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\d+-.]+)(.*)$/ );
489+
var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\d+-.]+)(.*)$/ ),
490+
// work around bug when a panel has no height - #7335
491+
propVal = prop === "height" && parts[ 1 ] === "0" ? 1 : parts[ 1 ];
490492
showProps[ prop ] = {
491-
value: parts[ 1 ],
493+
value: propVal,
492494
unit: parts[ 2 ] || "px"
493495
};
494496
});

0 commit comments

Comments
 (0)