Prevent clicks on video from initiating selections

This commit is contained in:
Thibaut Girka authored and ThibG committed 2018-09-21 12:56:13 +02:00
1 parent 5c9a2f5d77
commit 925c185ef9
2 files changed
+11 -2

No files matched your search

@@ -135,7 +135,10 @@ export default class Video extends React.PureComponent {
this.seek = c;
}
handleClickRoot = e => e.stopPropagation();
handleMouseDownRoot = e => {
e.preventDefault();
e.stopPropagation();
}
handlePlay = () => {
this.setState({ paused: false });
@@ -319,7 +322,7 @@ export default class Video extends React.PureComponent {
ref={this.setPlayerRef}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
onClick={this.handleClickRoot}
onMouseDown={this.handleMouseDownRoot}
tabIndex={0}
>
<video