2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

Add back support for IE 11

This commit is contained in:
Johann-S
2019-03-16 16:10:23 +02:00
committed by XhmikosR
parent f7c1b1e683
commit 08679ac0b5
10 changed files with 214 additions and 106 deletions
+18 -7
View File
@@ -731,7 +731,14 @@ $(function () {
})
QUnit.test('should enforce focus', function (assert) {
assert.expect(2)
var isIE11 = Boolean(window.MSInputMethodContext) && Boolean(document.documentMode)
if (isIE11) {
assert.expect(1)
} else {
assert.expect(2)
}
var done = assert.async()
var $modal = $([
@@ -759,14 +766,18 @@ $(function () {
done()
}
document.addEventListener('focusin', focusInListener)
if (isIE11) {
done()
} else {
document.addEventListener('focusin', focusInListener)
var focusInEvent = new Event('focusin')
Object.defineProperty(focusInEvent, 'target', {
value: $('#qunit-fixture')[0]
})
var focusInEvent = new Event('focusin')
Object.defineProperty(focusInEvent, 'target', {
value: $('#qunit-fixture')[0]
})
document.dispatchEvent(focusInEvent)
document.dispatchEvent(focusInEvent)
}
})
.bootstrapModal('show')
})