Skip to content

Commit

Permalink
Ignored keydown events that occur in textarea or input tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsbree committed Aug 21, 2015
1 parent 8289332 commit 15ee86c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/js/player/components/mixins/PlayerControls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ module.exports = {
}
},
onKeyDown: function(e) {
// Ignore if we're in a textarea or text input.
var targetTag = e.target.tagName.toLowerCase();
if(targetTag === 'input' || targetTag === 'textarea') {
return;
}

if(e.keyCode === 32) {
this.onPlayButtonClick();
e.preventDefault();
Expand Down

0 comments on commit 15ee86c

Please sign in to comment.