diff --git a/src/collapse/collapse.js b/src/collapse/collapse.js index eedb211d73..853ceb26ff 100644 --- a/src/collapse/collapse.js +++ b/src/collapse/collapse.js @@ -18,12 +18,12 @@ angular.module('ui.bootstrap.collapse', []) horizontal = !!('horizontal' in attrs); if (horizontal) { css = { - width: 'auto' + width: '' }; cssTo = {width: '0'}; } else { css = { - height: 'auto' + height: '' }; cssTo = {height: '0'}; } @@ -38,9 +38,9 @@ angular.module('ui.bootstrap.collapse', []) function getScrollFromElement(element) { if (horizontal) { - return {width: element.scrollWidth + 'px'}; + return {width: ''}; } - return {height: element.scrollHeight + 'px'}; + return {height: ''}; } function expand() {