Opened 14 years ago
Closed 13 years ago
#4695 closed bug (fixed)
Accordion issue (and fix) with fillSpace:true
Reported by: | Jörn Zaefferer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8.2 |
Component: | ui.accordion | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
There is a logical bug in accordion's .resize() method, when fillSpace is true. It calculates the maximum padding of all content panels, and then subtracts it from maxHeight to obtain the new panel size. This is wrong. I, for example, need to use different paddings in different content divs, and this approach produces wrong results in this case. The correct thing to do is to subtract each panel's padding individually. I was able to fix this (in 1.7.2) by replacing this: var maxPadding = 0; this.headers.next().each(function() { maxPadding = Math.max(maxPadding, $(this).innerHeight() - $ (this).height()); }).height(Math.max(0, maxHeight - maxPadding)) with this: this.headers.next().each(function() { var padding = $(this).innerHeight() - $(this).height(); $(this).height(Math.max(0, maxHeight - padding)); }) Please integrate this fix in the dev version, and in 1.7.3.
Change History (5)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Animations still jumpy for fillSpace.
comment:4 Changed 13 years ago by
The visual testcase passes when replacing the em-padding with px. Animating an element to 15% of 3em doesn't work that well.
comment:5 Changed 13 years ago by
Milestone: | 1.9 → 1.8.2 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Closing as this is working with pixels. Handling ems is a separate issue that we already know about.
Note: See
TracTickets for help on using
tickets.
Fixed in r3047.