From 3281c9b4c0935a9296e0ea5f359243d732605832 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 20 Nov 2020 14:20:17 +0100 Subject: Fix video not taking focus on interaction Revert part of #737 to restore hotkey functionality --- app/javascript/flavours/glitch/features/video/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app') 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} > -- cgit