0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-06 04:08:22 +01:00

Merge pull request #13306 from twbs/fat-11099

fixes #11099 - $.collapse() overrides the original dimension of the coll...
This commit is contained in:
Jacob 2014-04-20 12:12:17 -07:00
commit b02d3c7eff
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@
} }
this.$element this.$element
.removeClass('collapsing') .removeClass('collapsing')
.addClass('collapse in')[dimension]('auto') .addClass('collapse in')[dimension]('')
this.transitioning = 0 this.transitioning = 0
this.$element.trigger('shown.bs.collapse') this.$element.trigger('shown.bs.collapse')
} }

View File

@ -19,7 +19,7 @@ $(function () {
test('should show a collapsed element', function () { test('should show a collapsed element', function () {
var el = $('<div class="collapse"></div>').collapse('show') var el = $('<div class="collapse"></div>').collapse('show')
ok(el.hasClass('in'), 'has class in') 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 () { test('should hide a collapsed element', function () {
@ -51,7 +51,7 @@ $(function () {
ok(this.style.height == '0px') ok(this.style.height == '0px')
}) })
.on('shown.bs.collapse', function () { .on('shown.bs.collapse', function () {
ok(this.style.height == 'auto') ok(this.style.height === '')
start() start()
}) })
.collapse('show') .collapse('show')