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

lolsob-rspec
kedama 2019-01-07 23:54:40 +09:00 committed by Eugen Rochko
parent defe248b1c
commit 2a113f0185
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}