From: Thibaut Girka Date: Fri, 20 Nov 2020 13:20:17 +0000 (+0100) Subject: Fix video not taking focus on interaction X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=3281c9b4c0935a9296e0ea5f359243d732605832;p=mastodon.git Fix video not taking focus on interaction Revert part of #737 to restore hotkey functionality --- 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} >