mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +02:00
Merge pull request #17568 from Johann-S/fixCollapseHeight
[Fix #17555][V4] fix resetting style on closing collapse
This commit is contained in:
@@ -90,6 +90,21 @@ $(function () {
|
||||
.bootstrapCollapse('show')
|
||||
})
|
||||
|
||||
QUnit.test('should reset style to auto after finishing closing collapse', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
||||
$('<div class="collapse"/>')
|
||||
.on('shown.bs.collapse', function () {
|
||||
$(this).bootstrapCollapse('hide')
|
||||
})
|
||||
.on('hidden.bs.collapse', function () {
|
||||
assert.strictEqual(this.style.height, '', 'height is auto')
|
||||
done()
|
||||
})
|
||||
.bootstrapCollapse('show')
|
||||
})
|
||||
|
||||
QUnit.test('should remove "collapsed" class from target when collapse is shown', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
Reference in New Issue
Block a user