]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Don't include the height of absolute/fixed positioned siblings when calcul...
authorScott González <scott.gonzalez@gmail.com>
Sun, 19 Dec 2010 21:22:26 +0000 (16:22 -0500)
committerScott González <scott.gonzalez@gmail.com>
Sun, 19 Dec 2010 21:22:26 +0000 (16:22 -0500)
ui/jquery.ui.accordion.js

index 7dfc3523ee48ed1a85fc6ae9a7f4091afbdd7d78..aed10168ab0b4de548147a3399d252c0114e681e 100644 (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 );