mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
Backport #30326 (Unit test)
This commit is contained in:
@@ -959,4 +959,21 @@ $(function () {
|
|||||||
keyboard: false
|
keyboard: false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
QUnit.test('should not overflow when clicking outside of modal-content if backdrop = static', function (assert) {
|
||||||
|
assert.expect(1)
|
||||||
|
var done = assert.async()
|
||||||
|
var $modal = $('<div class="modal" data-backdrop="static"><div class="modal-dialog" style="transition-duration: 20ms;"/></div>').appendTo('#qunit-fixture')
|
||||||
|
|
||||||
|
$modal.on('shown.bs.modal', function () {
|
||||||
|
$modal.trigger('click')
|
||||||
|
setTimeout(function () {
|
||||||
|
assert.strictEqual($modal[0].clientHeight, $modal[0].scrollHeight)
|
||||||
|
done()
|
||||||
|
}, 20)
|
||||||
|
})
|
||||||
|
.bootstrapModal({
|
||||||
|
backdrop: 'static'
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user