From dab6a41e049de64653c8b91c28acf212137b0452 Mon Sep 17 00:00:00 2001 From: Matheus Azzi Date: Sat, 15 Oct 2016 22:55:48 -0300 Subject: 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. --- js/src/carousel.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/src') diff --git a/js/src/carousel.js b/js/src/carousel.js index 304d0160f..78f8eb468 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -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: -- cgit v1.2.3