mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-17 20:32:56 +00:00
Stop gifv timeline preview explicitly when open the media gallery. (#9749)
This commit is contained in:
parent
5654535728
commit
cf3c0fc38c
|
@ -51,6 +51,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