diff options
author | ysds <ysds.code@gmail.com> | 2020-06-25 18:56:10 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-07-06 16:40:27 +0300 |
commit | 9a6cfeb36e57f73d21b33926039f9ffb2fb5c465 (patch) | |
tree | d7e02025fcc0a583bf9dbcd623e0bb3d8c32031a | |
parent | ea01c29294f3c70d74783f19c5f7406bd5ddbe9a (diff) |
Backport #30326 (Unit test)
-rw-r--r-- | js/tests/unit/modal.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 5434987d8b..3920fe387f 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -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' + }) + }) }) |