mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Show panels on destroy. Fixes #8795 - Tabs: 'display: none;' attribute is not removed from tabs when destroy is called.
(cherry picked from commit fd48568c40
)
This commit is contained in:
parent
b5cf5b6ad8
commit
41ec41126d
@ -205,6 +205,33 @@ window.domEqual = function( selector, modifier, message ) {
|
|||||||
"title"
|
"title"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function getElementStyles( elem ) {
|
||||||
|
var key, len,
|
||||||
|
style = elem.ownerDocument.defaultView ?
|
||||||
|
elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
|
||||||
|
elem.currentStyle,
|
||||||
|
styles = {};
|
||||||
|
|
||||||
|
if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
|
||||||
|
len = style.length;
|
||||||
|
while ( len-- ) {
|
||||||
|
key = style[ len ];
|
||||||
|
if ( typeof style[ key ] === "string" ) {
|
||||||
|
styles[ $.camelCase( key ) ] = style[ key ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// support: Opera, IE <9
|
||||||
|
} else {
|
||||||
|
for ( key in style ) {
|
||||||
|
if ( typeof style[ key ] === "string" ) {
|
||||||
|
styles[ key ] = style[ key ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return styles;
|
||||||
|
}
|
||||||
|
|
||||||
function extract( elem ) {
|
function extract( elem ) {
|
||||||
if ( !elem || !elem.length ) {
|
if ( !elem || !elem.length ) {
|
||||||
QUnit.push( false, actual, expected,
|
QUnit.push( false, actual, expected,
|
||||||
@ -222,6 +249,7 @@ window.domEqual = function( selector, modifier, message ) {
|
|||||||
var value = elem.attr( attr );
|
var value = elem.attr( attr );
|
||||||
result[ attr ] = value !== undefined ? value : "";
|
result[ attr ] = value !== undefined ? value : "";
|
||||||
});
|
});
|
||||||
|
result.style = getElementStyles( elem[ 0 ] );
|
||||||
result.events = $._data( elem[ 0 ], "events" );
|
result.events = $._data( elem[ 0 ], "events" );
|
||||||
result.data = $.extend( {}, elem.data() );
|
result.data = $.extend( {}, elem.data() );
|
||||||
delete result.data[ $.expando ];
|
delete result.data[ $.expando ];
|
||||||
|
2
ui/jquery.ui.tabs.js
vendored
2
ui/jquery.ui.tabs.js
vendored
@ -727,6 +727,8 @@ $.widget( "ui.tabs", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.panels.show();
|
||||||
|
|
||||||
if ( this.options.heightStyle !== "content" ) {
|
if ( this.options.heightStyle !== "content" ) {
|
||||||
this.panels.css( "height", "" );
|
this.panels.css( "height", "" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user