{"action":"created","issue":{"url":"https://api.github.com/repos/thednp/bootstrap.native/issues/32","labels_url":"https://api.github.com/repos/thednp/bootstrap.native/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/thednp/bootstrap.native/issues/32/comments","events_url":"https://api.github.com/repos/thednp/bootstrap.native/issues/32/events","html_url":"https://github.com/thednp/bootstrap.native/pull/32","id":118882537,"number":32,"title":"Collapse fixes","user":{"login":"soda0289","id":2373964,"avatar_url":"https://avatars.githubusercontent.com/u/2373964?v=3","gravatar_id":"","url":"https://api.github.com/users/soda0289","html_url":"https://github.com/soda0289","followers_url":"https://api.github.com/users/soda0289/followers","following_url":"https://api.github.com/users/soda0289/following{/other_user}","gists_url":"https://api.github.com/users/soda0289/gists{/gist_id}","starred_url":"https://api.github.com/users/soda0289/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soda0289/subscriptions","organizations_url":"https://api.github.com/users/soda0289/orgs","repos_url":"https://api.github.com/users/soda0289/repos","events_url":"https://api.github.com/users/soda0289/events{/privacy}","received_events_url":"https://api.github.com/users/soda0289/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T17:10:19Z","updated_at":"2015-11-25T23:37:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thednp/bootstrap.native/pulls/32","html_url":"https://github.com/thednp/bootstrap.native/pull/32","diff_url":"https://github.com/thednp/bootstrap.native/pull/32.diff","patch_url":"https://github.com/thednp/bootstrap.native/pull/32.patch"},"body":"I have noticed some issues with Collapse and how it calculates max height and resizes the div. The current getMaxHeight function doesn't take in to account padding of the collapsible div and returns and incorrect height. Also, in Firefox, when a dropdown select form element is present it can't be used as it disappears when the style attribute and class is modified. This was resolved by adding a current height variable and only calling resize when maxHeight changes for the div.\r\n\r\nAn example of these problems can be seen here:\r\nhttp://codepen.io/anon/pen/MaMwgW"},"comment":{"url":"https://api.github.com/repos/thednp/bootstrap.native/issues/comments/159755577","html_url":"https://github.com/thednp/bootstrap.native/pull/32#issuecomment-159755577","issue_url":"https://api.github.com/repos/thednp/bootstrap.native/issues/32","id":159755577,"user":{"login":"thednp","id":6761246,"avatar_url":"https://avatars.githubusercontent.com/u/6761246?v=3","gravatar_id":"","url":"https://api.github.com/users/thednp","html_url":"https://github.com/thednp","followers_url":"https://api.github.com/users/thednp/followers","following_url":"https://api.github.com/users/thednp/following{/other_user}","gists_url":"https://api.github.com/users/thednp/gists{/gist_id}","starred_url":"https://api.github.com/users/thednp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thednp/subscriptions","organizations_url":"https://api.github.com/users/thednp/orgs","repos_url":"https://api.github.com/users/thednp/repos","events_url":"https://api.github.com/users/thednp/events{/privacy}","received_events_url":"https://api.github.com/users/thednp/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T23:37:25Z","updated_at":"2015-11-25T23:37:25Z","body":"Thanks for the commit. The check for height readjust on resize is a good idea, but the other isn't because we're using `el.clientHeight` which returns the element's height as viewed on screen, so it does include the padding. \r\n\r\nThink of the padding as a way to add spacing to an element's \"inner content\" if I can call it like that, while the height css is the height without the padding, but go ahead play some CSS (I did) and will enlighten you real quick: `el.clientHeight = el.computedStyle.height + el.computedStyle.paddingTop + el.computedStyle.paddingBottom`. I did."}}