aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob <[email protected]>2014-04-20 12:12:17 -0700
committerJacob <[email protected]>2014-04-20 12:12:17 -0700
commitb02d3c7effdaa4ca8ecf79b3cf6cc71d6efcc533 (patch)
tree8a1853cd043c5aefd6d3eae3ecb238e953af742a
parent4f427cbe32cdbe60c8c590fb5b92a50c13d446bc (diff)
parentcd4696f7231cbf6f0478a3bfc1b5c4551e3a290e (diff)
downloadbootstrap-b02d3c7effdaa4ca8ecf79b3cf6cc71d6efcc533.tar.xz
bootstrap-b02d3c7effdaa4ca8ecf79b3cf6cc71d6efcc533.zip
Merge pull request #13306 from twbs/fat-11099
fixes #11099 - $.collapse() overrides the original dimension of the coll...
-rw-r--r--js/collapse.js2
-rw-r--r--js/tests/unit/collapse.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/js/collapse.js b/js/collapse.js
index 42563c08e..266f3580d 100644
--- a/js/collapse.js
+++ b/js/collapse.js
@@ -63,7 +63,7 @@
}
this.$element
.removeClass('collapsing')
- .addClass('collapse in')[dimension]('auto')
+ .addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element.trigger('shown.bs.collapse')
}
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index bead36f91..66b2dc1a7 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -19,7 +19,7 @@ $(function () {
test('should show a collapsed element', function () {
var el = $('<div class="collapse"></div>').collapse('show')
ok(el.hasClass('in'), 'has class in')
- ok(/height/.test(el.attr('style')), 'has height set')
+ ok(!/height/.test(el.attr('style')), 'has height reset')
})
test('should hide a collapsed element', function () {
@@ -51,7 +51,7 @@ $(function () {
ok(this.style.height == '0px')
})
.on('shown.bs.collapse', function () {
- ok(this.style.height == 'auto')
+ ok(this.style.height === '')
start()
})
.collapse('show')