mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Calculate border and padding on tabs container. Fixed #8836: Height overflows parent with heightStyle: 'fill'.
This commit is contained in:
parent
ee8d20ea06
commit
6121683d80
@ -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() {
|
||||
|
2
ui/jquery.ui.tabs.js
vendored
2
ui/jquery.ui.tabs.js
vendored
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user