Opened 8 years ago

Closed 8 years ago

Last modified 7 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.

Change History (9)

comment:1 Changed 8 years ago by rdworth

  • Milestone changed from TBD to 1.6

comment:3 Changed 8 years ago by jzaefferer

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 8 years ago by jzaefferer

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

showProps.height = showHeight;

Still somewhat laggy.

comment:6 Changed 8 years ago by scottgonzalez

Mostly fixed in r1926.

comment:7 Changed 8 years ago by jzaefferer

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

comment:8 Changed 8 years ago by jzaefferer

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 8 years ago by scottgonzalez

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

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.