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

Commit aef24cd

Browse files
committed
fix(collapse): default to css
- Default to value set from CSS for height/width Closes #6182 Fixes #6045
1 parent b893a93 commit aef24cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/collapse/collapse.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ angular.module('ui.bootstrap.collapse', [])
1818
horizontal = !!('horizontal' in attrs);
1919
if (horizontal) {
2020
css = {
21-
width: 'auto'
21+
width: ''
2222
};
2323
cssTo = {width: '0'};
2424
} else {
2525
css = {
26-
height: 'auto'
26+
height: ''
2727
};
2828
cssTo = {height: '0'};
2929
}
@@ -38,9 +38,9 @@ angular.module('ui.bootstrap.collapse', [])
3838

3939
function getScrollFromElement(element) {
4040
if (horizontal) {
41-
return {width: element.scrollWidth + 'px'};
41+
return {width: ''};
4242
}
43-
return {height: element.scrollHeight + 'px'};
43+
return {height: ''};
4444
}
4545

4646
function expand() {

0 commit comments

Comments
 (0)