From: Scott González Date: Sun, 19 Dec 2010 21:22:26 +0000 (-0500) Subject: Accordion: Don't include the height of absolute/fixed positioned siblings when calcul... X-Git-Tag: 1.9m4~94 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=32945202da1854a1b603db4994a263f4f789d398;p=jquery-ui.git Accordion: Don't include the height of absolute/fixed positioned siblings when calculating size for heightStyle: fill. --- diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 7dfc3523e..aed10168a 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -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 );