summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-03 13:24:39 -0800
committerCorey Hulen <corey@hulen.com>2015-11-03 13:24:39 -0800
commit3656ba5344cdaa26a5563323f3fe8cb179fac6dd (patch)
treea8fc23009f1c4645a4c533f6fcc7b101af0040af /web/react/components
parent1904a57891d92e84e90c197249fa8497dcee1d9d (diff)
parentb1a8cf6fc56d25b5e3f5425d06c52d379b900ebc (diff)
downloadchat-3656ba5344cdaa26a5563323f3fe8cb179fac6dd.tar.gz
chat-3656ba5344cdaa26a5563323f3fe8cb179fac6dd.tar.bz2
chat-3656ba5344cdaa26a5563323f3fe8cb179fac6dd.zip
Merge pull request #1290 from mattermost/fixed-embed-height
PLT-991 Fixing height of embeded images
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/post_body.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index e1f495d54..e4094daf3 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -77,12 +77,12 @@ export default class PostBody extends React.Component {
this.isGifLoading = true;
const gif = new Image();
- gif.src = src;
gif.onload = (
() => {
this.setState({gifLoaded: true});
}
);
+ gif.src = src;
}
createGifEmbed(link) {
@@ -92,7 +92,12 @@ export default class PostBody extends React.Component {
if (!this.state.gifLoaded) {
this.loadGif(link);
- return null;
+ return (
+ <img
+ className='gif-div placeholder'
+ height='500px'
+ />
+ );
}
return (