From 4e90f8c170d9ec03ca8b00e8eb27b50be1c95f68 Mon Sep 17 00:00:00 2001 From: Martijn Saly Date: Tue, 15 Jul 2014 16:41:01 +0200 Subject: [PATCH] Keydown now checks if the event was preventDefault()'ed. --- src/perfect-scrollbar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 2a01e5d..e1311d5 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -400,6 +400,10 @@ var shouldPrevent = false; $(document).bind('keydown' + eventClassName, function (e) { + if (e.isDefaultPrevented && e.isDefaultPrevented()) { + return; + } + if (!hovered || $(document.activeElement).is(":input,[contenteditable]")) { return; }