From 838ccbba771c446c4293e8dace4dd9cc86472a45 Mon Sep 17 00:00:00 2001 From: Jun Date: Thu, 23 Jun 2016 10:05:56 +0900 Subject: [PATCH] Make defaultPrevented condition more readable --- src/js/plugin/handler/keyboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/plugin/handler/keyboard.js b/src/js/plugin/handler/keyboard.js index 2b38844..5c4db17 100644 --- a/src/js/plugin/handler/keyboard.js +++ b/src/js/plugin/handler/keyboard.js @@ -40,7 +40,7 @@ function bindKeyboardHandler(element, i) { } i.event.bind(i.ownerDocument, 'keydown', function (e) { - if (e.isDefaultPrevented && e.isDefaultPrevented() || e.defaultPrevented) { + if ((e.isDefaultPrevented && e.isDefaultPrevented()) || e.defaultPrevented) { return; }