mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
@@ -812,4 +812,25 @@ $(function () {
|
||||
})
|
||||
.bootstrapModal('show')
|
||||
})
|
||||
|
||||
QUnit.test('should set .modal\'s scroll top to 0 if .modal-dialog-scrollable and modal body do not exists', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
||||
var $modal = $([
|
||||
'<div id="modal-test">',
|
||||
' <div class="modal-dialog modal-dialog-scrollable">',
|
||||
' <div class="modal-content">',
|
||||
' </div>',
|
||||
' </div>',
|
||||
'</div>'
|
||||
].join('')).appendTo('#qunit-fixture')
|
||||
|
||||
|
||||
$modal.on('shown.bs.modal', function () {
|
||||
assert.strictEqual($modal.scrollTop(), 0)
|
||||
done()
|
||||
})
|
||||
.bootstrapModal('show')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user