[Glitch] Stop gifv timeline preview explicitly when open the media gallery
Port 2a113f0185
to glitch-soc
This commit is contained in:
parent
e495dc0134
commit
fc64d1d03e
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue