2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00
Don't hide modal when `config.keyboard` is false
This commit is contained in:
Rohit Sharma
2020-11-22 01:44:28 +05:30
committed by GitHub
parent 2d8c02eb10
commit bfb773d64b
2 changed files with 34 additions and 35 deletions
+2 -3
View File
@@ -934,10 +934,10 @@ $(function () {
})
})
QUnit.test('should not close modal when escape key is pressed with keyboard = false and backdrop = static', function (assert) {
QUnit.test('should not close modal when escape key is pressed with keyboard = false', function (assert) {
assert.expect(1)
var done = assert.async()
var $modal = $('<div class="modal" data-backdrop="static" data-keyboard="false"><div class="modal-dialog" /></div>').appendTo('#qunit-fixture')
var $modal = $('<div class="modal"><div class="modal-dialog" /></div>').appendTo('#qunit-fixture')
$modal.on('shown.bs.modal', function () {
$modal.trigger($.Event('keydown', {
@@ -955,7 +955,6 @@ $(function () {
assert.strictEqual(false, true, 'should not hide the modal')
})
.bootstrapModal({
backdrop: 'static',
keyboard: false
})
})