diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-11-20 14:20:17 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-11-20 14:20:17 +0100 |
commit | 3281c9b4c0935a9296e0ea5f359243d732605832 (patch) | |
tree | 65e4711917b343a38c6e9f498f8d36e71dcde7c4 /app/javascript | |
parent | 15be0bde8a7d45ed032dd8b5a634216ccb9a056b (diff) |
Fix video not taking focus on interaction
Revert part of #737 to restore hotkey functionality
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/features/video/index.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 21a2594e7..ea40b6073 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -182,10 +182,7 @@ class Video extends React.PureComponent { this.volume = c; } - handleMouseDownRoot = e => { - e.preventDefault(); - e.stopPropagation(); - } + handleClickRoot = e => e.stopPropagation(); handlePlay = () => { this.setState({ paused: false }); @@ -578,7 +575,7 @@ class Video extends React.PureComponent { ref={this.setPlayerRef} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} - onMouseDown={this.handleMouseDownRoot} + onClick={this.handleClickRoot} onKeyDown={this.handleKeyDown} tabIndex={0} > |