Stop gifv timeline preview explicitly when open the media gallery. (#9749)

master
kedama 6 years ago committed by Eugen Rochko
parent 5654535728
commit cf3c0fc38c
  1. 4
      app/javascript/mastodon/components/media_gallery.js

@ -51,6 +51,10 @@ class Item extends React.PureComponent {
const { index, onClick } = this.props;
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
if (this.hoverToPlay()) {
e.target.pause();
e.target.currentTime = 0;
}
e.preventDefault();
onClick(index);
}

Loading…
Cancel
Save