Ticket #4011 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

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

ui.accordion.js-fixed-width.patch Download (1.1 KB) - added by joern.zaefferer 6 years ago.
Fix width of hidden element before calculating height

Change History

comment:1 Changed 6 years ago by rdworth

  • Milestone changed from TBD to 1.6

comment:3 Changed 6 years ago by joern.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 6 years ago by joern.zaefferer

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

showProps.height = showHeight;

Still somewhat laggy.

comment:5 Changed 6 years ago by joern.zaefferer

comment:6 Changed 6 years ago by scott.gonzalez

Mostly fixed in r1926.

Changed 6 years ago by joern.zaefferer

Fix width of hidden element before calculating height

comment:7 Changed 6 years ago by joern.zaefferer

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

comment:8 Changed 6 years ago by joern.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 5 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to fixed

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.