Browse Source

[Glitch] Stop gifv timeline preview explicitly when open the media gallery

Port cf3c0fc38c to glitch-soc
closed-social-glitch-2
Thibaut Girka 5 years ago
parent
commit
e03813cf0a
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      app/javascript/flavours/glitch/components/media_gallery.js

+ 4
- 0
app/javascript/flavours/glitch/components/media_gallery.js View File

@ -71,6 +71,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