Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

accordion does not shrink if contents shrink #138

Closed
jssebastian opened this issue Feb 12, 2013 · 3 comments
Closed

accordion does not shrink if contents shrink #138

jssebastian opened this issue Feb 12, 2013 · 3 comments

Comments

@jssebastian
Copy link

The accordion directive increases the height of the "accordion-body" when contents get larger. However, it does not decrease the height again when contents get smaller again.

Initially, on the accordion-body element I see style="height: auto". After making the contents grow by toggling an ui-if inside the accordion-body, I see style="height: 320px", and the accordion looks fine. The height also grows correctly if I further increase the contents.

However, when contents are removed, the height attribute does not change anymore, so there is a big empty space at the bottom of the accordion-body.

This is tested on chrome with the latest ui-bootstrap from git master branch. Should I put together a jsfiddle/plunkr or is this clear enough?

@SidhNor
Copy link
Contributor

SidhNor commented Feb 12, 2013

@jssebastian, thanks, good catch.
Would be very nice to see a plunkr.
I will definitively look into it.

@jssebastian
Copy link
Author

Here is a plunkr:

http://plnkr.co/edit/RaEK2a?p=preview

@SidhNor
Copy link
Contributor

SidhNor commented Feb 12, 2013

Ok,
I've made the fix, will push it with an additional unit test tomorrow when i have some spare time.
Will close once it is done.

codedogfish pushed a commit to codedogfish/angular-ui-bootstrap that referenced this issue Sep 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants