Skip to content
Permalink
Browse files

Tabs: Calculate border and padding on tabs container. Fixed #8836: He…

…ight overflows parent with heightStyle: 'fill'.
  • Loading branch information...
petersendidit authored and scottgonzalez committed Nov 26, 2012
1 parent ee8d20e commit 6121683d807b2da56cf6cde3240d5926421b280b
Showing with 11 additions and 1 deletion.
  1. +9 −1 tests/unit/tabs/tabs_options.js
  2. +2 −0 ui/jquery.ui.tabs.js
@@ -235,10 +235,18 @@ test( "{ heightStyle: 'content' }", function() {
});

test( "{ heightStyle: 'fill' }", function() {
expect( 2 );
expect( 4 );
$( "#tabs8Wrapper" ).height( 500 );
var element = $( "#tabs8" ).tabs({ heightStyle: "fill" });
equalHeight( element, 485 );
element.tabs( "destroy" );

element = $( "#tabs8" ).css({
"border": "1px solid black",
"padding": "1px 0"
});
element.tabs({ heightStyle: "fill" });
equalHeight( element, 481 );
});

test( "{ heightStyle: 'fill' } with sibling", function() {
@@ -497,6 +497,8 @@ $.widget( "ui.tabs", {

if ( heightStyle === "fill" ) {
maxHeight = parent.height();
maxHeight -= this.element.outerHeight() - this.element.height();

this.element.siblings( ":visible" ).each(function() {
var elem = $( this ),
position = elem.css( "position" );

0 comments on commit 6121683

Please sign in to comment.
You can’t perform that action at this time.