Skip to content

Commit

Permalink
Backport #30326 (Unit test)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysds authored and XhmikosR committed Jul 6, 2020
1 parent ea01c29 commit 9a6cfeb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions js/tests/unit/modal.js
Expand Up @@ -959,4 +959,21 @@ $(function () {
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'
})
})
})

0 comments on commit 9a6cfeb

Please sign in to comment.