From 17854d57ad54df15f85c38f93020a699b13b0469 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Fri, 19 Aug 2016 19:53:18 -0700 Subject: [PATCH] fix(collapse): default to css - Default to value set from CSS for height/width --- src/collapse/collapse.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() {