diff options
author | Sam Potts <me@sampotts.me> | 2017-11-06 20:34:11 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-06 20:34:11 +1100 |
commit | 9c4b7e70948af3a1e45b63b3d36f3cae86802919 (patch) | |
tree | 40db63a75409a01860c589b9e91fdeea84c2cdac /src | |
parent | 3a9beaed59f4eaca6ce2fd3f167f5c171317bb26 (diff) | |
download | plyr-9c4b7e70948af3a1e45b63b3d36f3cae86802919.tar.lz plyr-9c4b7e70948af3a1e45b63b3d36f3cae86802919.tar.xz plyr-9c4b7e70948af3a1e45b63b3d36f3cae86802919.zip |
Keyboard logic
Diffstat (limited to 'src')
-rw-r--r-- | src/js/listeners.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/listeners.js b/src/js/listeners.js index 29038a21..9483c6a9 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -325,10 +325,10 @@ const listeners = { }; // Keyboard shortcuts - if (this.config.keyboard.focused) { - utils.on(this.elements.container, 'keydown keyup', handleKey, false); - } else if (this.config.keyboard.global) { + if (this.config.keyboard.global) { utils.on(window, 'keydown keyup', handleKey, false); + } else if (this.config.keyboard.focused) { + utils.on(this.elements.container, 'keydown keyup', handleKey, false); } // Detect tab focus |