mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-30 07:19:13 +02:00
Rewritten modal without jquery (#23955)
* Trigger jquery events if available in event handler * Rewritten modal without jquery
This commit is contained in:
committed by
XhmikosR
parent
9f9712b98c
commit
33211eefdf
@@ -619,13 +619,9 @@ $(function () {
|
||||
|
||||
assert.strictEqual($template.find('.carousel-item')[1], $template.find('.active')[0], 'second item active')
|
||||
|
||||
<<<<<<< HEAD
|
||||
$template.trigger($.Event('keydown', {
|
||||
EventHandler.trigger($template[0], 'keydown', {
|
||||
which: 37
|
||||
}))
|
||||
=======
|
||||
EventHandler.trigger($template[0], 'keydown', { which: 37 })
|
||||
>>>>>>> fix unit test for carousel
|
||||
})
|
||||
|
||||
assert.strictEqual($template.find('.carousel-item')[0], $template.find('.active')[0], 'first item active')
|
||||
})
|
||||
@@ -651,13 +647,9 @@ $(function () {
|
||||
|
||||
assert.strictEqual($template.find('.carousel-item')[0], $template.find('.active')[0], 'first item active')
|
||||
|
||||
<<<<<<< HEAD
|
||||
$template.trigger($.Event('keydown', {
|
||||
EventHandler.trigger($template[0], 'keydown', {
|
||||
which: 39
|
||||
}))
|
||||
=======
|
||||
EventHandler.trigger($template[0], 'keydown', { which: 39 })
|
||||
>>>>>>> fix unit test for carousel
|
||||
})
|
||||
|
||||
assert.strictEqual($template.find('.carousel-item')[1], $template.find('.active')[0], 'second item active')
|
||||
})
|
||||
@@ -676,24 +668,14 @@ $(function () {
|
||||
$template.bootstrapCarousel()
|
||||
var done = assert.async()
|
||||
|
||||
<<<<<<< HEAD
|
||||
var eventArrowDown = $.Event('keydown', {
|
||||
which: 40
|
||||
})
|
||||
var eventArrowUp = $.Event('keydown', {
|
||||
which: 38
|
||||
})
|
||||
|
||||
$template.one('keydown', function (event) {
|
||||
assert.strictEqual(event.isDefaultPrevented(), false)
|
||||
=======
|
||||
EventHandler.one($template[0], 'keydown', function (event) {
|
||||
assert.strictEqual(event.defaultPrevented, false)
|
||||
>>>>>>> fix unit test for carousel
|
||||
})
|
||||
|
||||
// arrow down
|
||||
EventHandler.trigger($template[0], 'keydown', { which: 40 })
|
||||
EventHandler.trigger($template[0], 'keydown', {
|
||||
which: 40
|
||||
})
|
||||
|
||||
EventHandler.one($template[0], 'keydown', function (event) {
|
||||
assert.strictEqual(event.defaultPrevented, false)
|
||||
@@ -701,7 +683,9 @@ $(function () {
|
||||
})
|
||||
|
||||
// arrow up
|
||||
EventHandler.trigger($template[0], 'keydown', { which: 38 })
|
||||
EventHandler.trigger($template[0], 'keydown', {
|
||||
which: 38
|
||||
})
|
||||
})
|
||||
|
||||
QUnit.test('should support disabling the keyboard navigation', function (assert) {
|
||||
|
Reference in New Issue
Block a user