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:
+18
-7
@@ -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')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user