bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Nested accordion/collapse doesnt resize with 2.0.3, but did in 2.0.2

Open ShaunR opened this issue 14 years ago • 9 comments

When nesting accordions in 2.0.2 everything worked fine, but in 2.0.3 the accordion-body of the parent does not auto size like it used too.

Example in 2.0.2 (working correctly) http://jsfiddle.net/jHQQR/1/

Example in 2.0.3 (not working) http://jsfiddle.net/jHQQR/2/

ShaunR avatar Apr 24 '12 18:04 ShaunR

I just encountered this as well. The nuance for me is that it happens only in IE9. I just confirmed that with the two jsFiddles Shaun posted. In Chrome (Windows 7, latest) they both work fine, but on IE. The other twist is that if you default the parent group to open (using the "in" class) everything works fine until you collapse the parent and reopen it, at which point this behavior appears. It maintains whatever size it was when first expanded. If you close and reopen, it reflows.

You can see that variant at: http://jsfiddle.net/tHWBb/

CrawfordWCR avatar Apr 25 '12 04:04 CrawfordWCR

See whats weird is that only one works for me in Chrome, i'm running Windows 7 also... My chrome version is 18.0.1025.162 m

Firefox - working IE 9 - broken Safari - working

ShaunR avatar Apr 25 '12 14:04 ShaunR

I believe @fat made the call (and I support it) to not try to support nesting of accordions. It's really not an idea I've ever seen implemented well anywhere, but we'll take another look anyway.

mdo avatar May 14 '12 06:05 mdo

Just for your information, this seems to be fixed in the current v2.0.3 I am getting from the frontpage. However this is not the same v2.0.3 I got about 20 days ago when it was released and this bug was reported. Could it be that there are multiple v2.0.3s around? If yes, why not name it as v2.0.4?

juhovh avatar May 15 '12 14:05 juhovh

seems to work in 2.0.4 - closing...

fat avatar Jun 03 '12 04:06 fat

Upgraded the app in question to use the new 2.0.4 from the front page, and the problem still exists in IE 9 (although it does work properly in Chrome and Safari and FireFox as before). See the Fiddle I posted above (which links to the latest version of Bootstrap on GitHub). So not fixed.

CrawfordWCR avatar Jul 23 '12 18:07 CrawfordWCR

Same issue.

ghost avatar Jul 31 '12 18:07 ghost

I made this commit to fix the problem I was having with nesting collapses. Not sure whether it would cause any other problems, since the fix seems to easy to not have been considered.

https://github.com/fbcpublishing/bootstrap/commit/e439e5a2a80e6ed15864d0fa92ccba4e49f88489

dbernar1 avatar Aug 29 '12 16:08 dbernar1

@dbernar1 - worked for me, lose the animation, but sluggish on mobile anyway @mdo - Probably not much call for nested accordions, however, I've found a case for it - responsive collapsible side col area (basically when layout ends up as one column), which happens to have standard TB accordions in it - the target has the handy nav-collapse class. Works a treat.

mattpi avatar Jun 14 '13 16:06 mattpi