Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#4011 closed bug (fixed)

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:

Description

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)

ui.accordion.js-fixed-width.patch (1.1 KB) - added by Jörn Zaefferer 15 years ago.
Fix width of hidden element before calculating height

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by rdworth

Milestone: TBD1.6

comment:3 Changed 15 years ago by Jörn Zaefferer

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.

comment:4 Changed 15 years ago by Jörn Zaefferer

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

showProps.height = showHeight;

Still somewhat laggy.

comment:6 Changed 15 years ago by Scott González

Mostly fixed in r1926.

Changed 15 years ago by Jörn Zaefferer

Fix width of hidden element before calculating height

comment:7 Changed 15 years ago by Jörn Zaefferer

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

comment:8 Changed 15 years ago by Jörn Zaefferer

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.

comment:9 Changed 15 years ago by Scott González

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.