[Glitch] Stop gifv timeline preview explicitly when open the media gallery
Port cf3c0fc38c
to glitch-soc
pull/885/head
parent
147f4f9fd2
commit
e03813cf0a
|
@ -71,6 +71,10 @@ class Item extends React.PureComponent {
|
||||||
const { index, onClick } = this.props;
|
const { index, onClick } = this.props;
|
||||||
|
|
||||||
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
|
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
|
||||||
|
if (this.hoverToPlay()) {
|
||||||
|
e.target.pause();
|
||||||
|
e.target.currentTime = 0;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onClick(index);
|
onClick(index);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue