#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)
Change History (10)
comment:1 Changed 15 years ago by
Milestone: | TBD → 1.6 |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
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
Turns out showProps.height is NaN, overwriting it helps:
showProps.height = showHeight;
Still somewhat laggy.
comment:5 Changed 15 years ago by
A more realistic testcase: http://jquery-ui.googlecode.com/svn/trunk/tests/visual/accordion/width.html
Changed 15 years ago by
Attachment: | ui.accordion.js-fixed-width.patch added |
---|
Fix width of hidden element before calculating height
comment:8 Changed 15 years ago by
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
Resolution: | → fixed |
---|---|
Status: | new → closed |
Closing as fixed as this specific problem has been fixed. Created #4178 for the slight jump that still remains.
Demo in SVN: http://jquery-ui.googlecode.com/svn/trunk/demos/accordion/noAutoHeight.html