accordion: chaining breaks if value in height() is negative (fixes #4102)

This commit is contained in:
Paul Bakaus
2009-02-10 08:59:24 +00:00
parent 3677e62f15
commit 8ccbc0ac55

View 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 ) {