mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +02:00
Carousel: Only prevents default for ARROW_LEFT and ARROW_RIGHT keys
Fixes 2 bugs: 1. All keydowns were being prevented. Because of that the user wasn't able to navigate in the whole page using ARROW_UP/ARROW_DOWN. 2. Even when is an input or textarea the keydowns were being prevented. Because of that the user wasn't able to type any text on these elements.
This commit is contained in:
committed by
Bardi Harborow
parent
1d6cdb65b3
commit
dab6a41e04
@@ -245,9 +245,11 @@ const Carousel = (($) => {
|
||||
|
||||
switch (event.which) {
|
||||
case ARROW_LEFT_KEYCODE:
|
||||
event.preventDefault()
|
||||
this.prev()
|
||||
break
|
||||
case ARROW_RIGHT_KEYCODE:
|
||||
event.preventDefault()
|
||||
this.next()
|
||||
break
|
||||
default:
|
||||
|
Reference in New Issue
Block a user