Skip to content

Commit

Permalink
Accordion: Reset overflow on both content panels being animated, not …
Browse files Browse the repository at this point in the history
…just the one being shown. Fixes #6957 - .ui-accordion-content's overflow value does not change back to auto in IE 6.
  • Loading branch information
scottgonzalez committed Feb 8, 2011
1 parent fba3349 commit fb35d4e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ui/jquery.ui.accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ $.widget( "ui.accordion", {

if ( options.heightStyle === "fill" ) {
// IE 6 treats height like minHeight, so we need to turn off overflow
// in ordder to get a reliable height
// in order to get a reliable height
// we use the minHeight support test because we assume that only
// browsers that don't support minHeight will treat height as minHeight
if ( !$.support.minHeight ) {
Expand Down Expand Up @@ -366,8 +366,7 @@ $.widget( "ui.accordion", {
toShow: toShow,
toHide: toHide,
complete: complete,
down: toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) ),
autoHeight: options.heightStyle !== "content"
down: toShow.length && ( !toHide.length || ( toShow.index() < toHide.index() ) )
}, additional );
} else {
toHide.hide();
Expand Down Expand Up @@ -418,7 +417,8 @@ $.extend( $.ui.accordion, {
version: "@VERSION",
animations: {
slide: function( options, additions ) {
var overflow = options.toShow.css( "overflow" ),
var showOverflow = options.toShow.css( "overflow" ),
hideOverflow = options.toHide.css( "overflow" ),
percentDone = 0,
showProps = {},
hideProps = {},
Expand Down Expand Up @@ -497,13 +497,11 @@ $.extend( $.ui.accordion, {
duration: options.duration,
easing: options.easing,
complete: function() {
if ( !options.autoHeight ) {
options.toShow.css( "height", "" );
}
options.toShow.css({
width: originalWidth,
overflow: overflow
overflow: showOverflow
});
options.toHide.css( "overflow", hideOverflow );
options.complete();
}
});
Expand Down

0 comments on commit fb35d4e

Please sign in to comment.