From 15ec9431beb40eda9d1186c569912e68ca2cece4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 9 Mar 2018 11:33:05 +0100 Subject: [PATCH] Fix thumbnail not filling entire space sometimes (#6709) --- app/javascript/mastodon/components/media_gallery.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 71436500af..9310e7c963 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;