Skip to content

Commit

Permalink
fix(FEC-9281): ignore shortcut handling if focused on editable node (#…
Browse files Browse the repository at this point in the history
…400)


ignore shortcut handling if focused on editable node
Solves FEC-9281
  • Loading branch information
eransakal authored and OrenMe committed Nov 28, 2019
1 parent 0faee6f commit 23bc7b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/keyboard/keyboard.js
Expand Up @@ -71,7 +71,9 @@ class Keyboard extends Component {
return;
}
playerContainer.onkeydown = (e: KeyboardEvent) => {
if (!this.props.shareOverlay && !this.props.playerNav && typeof this.keyboardHandlers[e.keyCode] === 'function') {
const nodeName = e.target instanceof Node ? e.target.nodeName || '' : '';
const isEditableNode = ['INPUT', 'SELECT', 'TEXTAREA'].indexOf(nodeName) !== -1;
if (!isEditableNode && !this.props.shareOverlay && !this.props.playerNav && typeof this.keyboardHandlers[e.keyCode] === 'function') {
this.props.logger.debug(`KeyDown -> keyName: ${getKeyName(e.keyCode)}, shiftKey: ${e.shiftKey.toString()}`);
const {preventDefault, payload} = this.keyboardHandlers[e.keyCode](e);
if (preventDefault) {
Expand Down

0 comments on commit 23bc7b9

Please sign in to comment.