From 11697d68942db7b97a4c7384e4fb4148a97b9122 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;