Skip to content

Commit fb35d4e

Browse files
committed
Accordion: Reset overflow on both content panels being animated, not just the one being shown. Fixes #6957 - .ui-accordion-content's overflow value does not change back to auto in IE 6.
1 parent fba3349 commit fb35d4e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ui/jquery.ui.accordion.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ $.widget( "ui.accordion", {
219219

220220
if ( options.heightStyle === "fill" ) {
221221
// IE 6 treats height like minHeight, so we need to turn off overflow
222-
// in ordder to get a reliable height
222+
// in order to get a reliable height
223223
// we use the minHeight support test because we assume that only
224224
// browsers that don't support minHeight will treat height as minHeight
225225
if ( !$.support.minHeight ) {
@@ -366,8 +366,7 @@ $.widget( "ui.accordion", {
366366
toShow: toShow,
367367
toHide: toHide,
368368
complete: complete,
369-
down: toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) ),
370-
autoHeight: options.heightStyle !== "content"
369+
down: toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) )
371370
}, additional );
372371
} else {
373372
toHide.hide();
@@ -418,7 +417,8 @@ $.extend( $.ui.accordion, {
418417
version: "@VERSION",
419418
animations: {
420419
slide: function( options, additions ) {
421-
var overflow = options.toShow.css( "overflow" ),
420+
var showOverflow = options.toShow.css( "overflow" ),
421+
hideOverflow = options.toHide.css( "overflow" ),
422422
percentDone = 0,
423423
showProps = {},
424424
hideProps = {},
@@ -497,13 +497,11 @@ $.extend( $.ui.accordion, {
497497
duration: options.duration,
498498
easing: options.easing,
499499
complete: function() {
500-
if ( !options.autoHeight ) {
501-
options.toShow.css( "height", "" );
502-
}
503500
options.toShow.css({
504501
width: originalWidth,
505-
overflow: overflow
502+
overflow: showOverflow
506503
});
504+
options.toHide.css( "overflow", hideOverflow );
507505
options.complete();
508506
}
509507
});

0 commit comments

Comments
 (0)