diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-10 01:26:12 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-10 01:26:12 +0200 |
commit | 5fbcf7441c0ce9c053e056fa93fcd07405f9eaf3 (patch) | |
tree | 7ccfc7c9c3bf17ba47469ac5bf9b5bae66d07640 /js/gui | |
parent | 144607005140602e3e33f8682ceed331e76982aa (diff) |
update traceur runtime
Diffstat (limited to 'js/gui')
-rw-r--r-- | js/gui/KeyboardShortcuts.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/js/gui/KeyboardShortcuts.js b/js/gui/KeyboardShortcuts.js index b5f27e8a0..ad0943cde 100644 --- a/js/gui/KeyboardShortcuts.js +++ b/js/gui/KeyboardShortcuts.js @@ -16,8 +16,6 @@ (function (window, document, $) { 'use strict'; - const scrollArea = $('#app-content'); - const noInputFocused = (element) => { return !( element.is('input') || @@ -62,7 +60,7 @@ const scrollToPreviousItem = (scrollArea) => { const items = scrollArea.find('.item'); - for (let item of items) { + for (var item of items) { item = $(item); if (item.position().top >= 0) { @@ -118,12 +116,12 @@ }; $(document).keyup((event) => { - const keyCode = event.keyCode; - if (noInputFocused($(':focus')) && noModifierKey(event)) { + const keyCode = event.keyCode; + const scrollArea = $('#app-content'); // j, n, right arrow - if ([74, 78, 34].indexOf(keyCode) >= 0) { + if ([74, 78, 33].indexOf(keyCode) >= 0) { event.preventDefault(); scrollToNextItem(scrollArea); |