Commit cd4696f7 authored by fat's avatar fat

fixes #11099 - $.collapse() overrides the original dimension of the coll...

parent 1254c322
......@@ -59,7 +59,7 @@
if (e && e.target != this.$element[0]) return
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('auto')
.addClass('collapse in')[dimension]('')
this.transitioning = 0
this.$element.trigger('shown.bs.collapse')
}
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment