Accordion: Don't include the height of absolute/fixed positioned siblings when calculating size for heightStyle: fill.

This commit is contained in:
Scott González 2010-12-19 16:22:26 -05:00
parent 75b94a1c12
commit 32945202da

View File

@ -264,7 +264,13 @@ $.widget( "ui.accordion", {
}
maxHeight = this.element.parent().height();
this.element.siblings( ":visible" ).each(function() {
maxHeight -= $( this ).outerHeight( true );
var elem = $( this ),
position = elem.css( "position" );
if ( position === "absolute" || position === "fixed" ) {
return;
}
maxHeight -= elem.outerHeight( true );
});
if ($.browser.msie) {
this.element.parent().css( "overflow", defOverflow );