diff --git a/src/js/plugins/keyboard.js b/src/js/plugins/keyboard.js index ce199f5..f8b5d61 100644 --- a/src/js/plugins/keyboard.js +++ b/src/js/plugins/keyboard.js @@ -25,6 +25,18 @@ export default class Keyboard { let method; let argument; + // Check if there's a focused element that might use the keyboard. + if (document.activeElement) { + const isContentEditable = document.activeElement + .contentEditable !== 'inherit'; + const isInput = ['INPUT', 'SELECT', 'OPTION', 'TEXTAREA'] + .indexOf(document.activeElement.tagName) > -1; + + if (isInput || isContentEditable) { + return; + } + } + switch (event.which) { case Keys.AV_PAGE: case Keys.SPACE: