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

Commit

Permalink
fix(collapse): default to css
Browse files Browse the repository at this point in the history
- Default to value set from CSS for height/width

Closes #6182
Fixes #6045
  • Loading branch information
wesleycho committed Aug 20, 2016
1 parent b893a93 commit aef24cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/collapse/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'};
}
Expand All @@ -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() {
Expand Down

0 comments on commit aef24cd

Please sign in to comment.