]> source.dussan.org Git - jquery-ui.git/commitdiff
accordion: chaining breaks if value in height() is negative (fixes #4102)
authorPaul Bakaus <paul.bakaus@googlemail.com>
Tue, 10 Feb 2009 08:59:24 +0000 (08:59 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Tue, 10 Feb 2009 08:59:24 +0000 (08:59 +0000)
ui/ui.accordion.js

index 5879bbf90c6940e046d7d91d229361d04117bcc6..679f7a01747adad51119d7ecedd1a2d211683c6b 100644 (file)
@@ -185,7 +185,7 @@ $.widget("ui.accordion", {
                        var maxPadding = 0;
                        this.headers.next().each(function() {
                                maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
-                       }).height(maxHeight - maxPadding)
+                       }).height(Math.max(0, maxHeight - maxPadding))
                        .css('overflow', 'auto');
 
                } else if ( o.autoHeight ) {