Skip to main content

Search and Top Navigation

#4011 closed bug (fixed)

Opened January 30, 2009 07:05PM UTC

Closed February 18, 2009 05:30PM UTC

Last modified January 17, 2010 06:03AM UTC

UI Accordion autoHeight:false animation jumps in 1.6rc6

Reported by: grabanski Owned by:
Priority: critical Milestone: 1.7
Component: ui.accordion Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:

When you set the autoHeight to false then the animation jumps instead of being smooth. This worked fine in 1.6rc4 and happened when upgrading to 1.6rc6.

Attachments (1)
Change History (9)

Changed January 30, 2009 08:16PM UTC by rdworth comment:1

milestone: TBD1.6

Changed January 30, 2009 08:49PM UTC by jzaefferer comment:2

Changed January 30, 2009 09:36PM UTC by jzaefferer comment:3

The old code calculated the relative difference between the two panels, and took that into account:

var difference = showHeight / hideHeight;
var current = (hideHeight - now) * difference;

For autoHeight:false we somehow need to consider the relative difference, too.

Changed January 30, 2009 09:37PM UTC by jzaefferer comment:4

Turns out showProps.height is NaN, overwriting it helps:

showProps.height = showHeight;

Still somewhat laggy.

Changed January 30, 2009 09:47PM UTC by jzaefferer comment:5

Changed January 31, 2009 02:56AM UTC by scottgonzalez comment:6

Mostly fixed in r1926.

Changed January 31, 2009 04:53PM UTC by jzaefferer comment:7

Further improved in r1935. Perfect in FF, not yet in IE.

Changed February 01, 2009 12:35PM UTC by jzaefferer comment:8

In IE: Killing margin-top on p-elements fixes tests/visual/accordion/width.html.

Also not removing the fixed-height seems to fix it, too, but kills the ability to change the accordion content. These lines:

if ( !options.autoHeight ) {
	options.toShow.css("height", "");

Seems like margin-top on elements inside the content-element breaks the height calculation, making it too small, causing the jump to a bigger panel once the animation completed and the height-style is removed.

Changed February 18, 2009 05:30PM UTC by scottgonzalez comment:9

resolution: → fixed
status: newclosed

Closing as fixed as this specific problem has been fixed. Created #4178 for the slight jump that still remains.