about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-03-09 11:33:05 +0100
committerGitHub <noreply@github.com>2018-03-09 11:33:05 +0100
commit11697d68942db7b97a4c7384e4fb4148a97b9122 (patch)
treeabb9bca73baf152c1a1496b082bd985c21e351b4
parent675b8fea5321310b9f87ac358f71a3f6ce63dd3d (diff)
Fix thumbnail not filling entire space sometimes (#6709)
-rw-r--r--app/javascript/mastodon/components/media_gallery.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js
index 71436500a..9310e7c96 100644
--- a/app/javascript/mastodon/components/media_gallery.js
+++ b/app/javascript/mastodon/components/media_gallery.js
@@ -168,11 +168,13 @@ class Item extends React.PureComponent {
         }
 
         if (originalWidth > originalHeight) {
-          imageStyle.height = '100%';
-          imageStyle.width  = 'auto';
+          imageStyle.height   = '100%';
+          imageStyle.width    = 'auto';
+          imageStyle.minWidth = '100%';
         } else {
-          imageStyle.height = 'auto';
-          imageStyle.width  = '100%';
+          imageStyle.height    = 'auto';
+          imageStyle.width     = '100%';
+          imageStyle.minHeight = '100%';
         }
 
         imageStyle.top  = vShift;