about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-01-11 10:53:58 +0100
committerGitHub <noreply@github.com>2019-01-11 10:53:58 +0100
commit2cfa55185a5fc7d93a160a4e9a4730aae6725b0f (patch)
treec57169b5a3d717f4e68b8ec5d2d6e220d1456434 /app/javascript/flavours/glitch/components
parentd1da0a1086fa25f22739277fbf32ba1b3745317d (diff)
parent394525e32994e605093c87d3a9fad2a4202f3401 (diff)
Merge pull request #885 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/account.js4
-rw-r--r--app/javascript/flavours/glitch/components/media_gallery.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/components/account.js b/app/javascript/flavours/glitch/components/account.js
index 80f20b8ad..072c601e0 100644
--- a/app/javascript/flavours/glitch/components/account.js
+++ b/app/javascript/flavours/glitch/components/account.js
@@ -67,10 +67,10 @@ export default class Account extends ImmutablePureComponent {
 
     if (hidden) {
       return (
-        <div>
+        <Fragment>
           {account.get('display_name')}
           {account.get('username')}
-        </div>
+        </Fragment>
       );
     }
 
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js
index 10afeb2eb..d0226bbbb 100644
--- a/app/javascript/flavours/glitch/components/media_gallery.js
+++ b/app/javascript/flavours/glitch/components/media_gallery.js
@@ -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);
     }