diff options
author | VeraLyu <lvroyce0210@gmail.com> | 2017-06-17 01:12:22 +0800 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-06-16 13:12:22 -0400 |
commit | 5158d3a44671f6faf2474b812987a7d301db7a2d (patch) | |
tree | 45011c36140e4f56fddce09ca59b1c1bb517a076 /webapp/components/youtube_video.jsx | |
parent | 617c6e0b23af1ba84aaa531261e951c5ce53102e (diff) | |
download | chat-5158d3a44671f6faf2474b812987a7d301db7a2d.tar.gz chat-5158d3a44671f6faf2474b812987a7d301db7a2d.tar.bz2 chat-5158d3a44671f6faf2474b812987a7d301db7a2d.zip |
Remove fake img preview before loaded (#5854)
Remove fake img preview and collapse toggle before it is loaded,
only show img and toggle after it is fully loaded.
Fix markdown img size and add scroll down behaviour.
Diffstat (limited to 'webapp/components/youtube_video.jsx')
-rw-r--r-- | webapp/components/youtube_video.jsx | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/webapp/components/youtube_video.jsx b/webapp/components/youtube_video.jsx index 0127fcb88..49f490bda 100644 --- a/webapp/components/youtube_video.jsx +++ b/webapp/components/youtube_video.jsx @@ -156,7 +156,13 @@ export default class YoutubeVideo extends React.Component { render() { if (!this.state.loaded) { - return <div className='video-loading'/>; + return ( + <div + className='post__embed-container' + > + <div className='video-loading'/> + </div> + ); } let header; @@ -217,13 +223,17 @@ export default class YoutubeVideo extends React.Component { } return ( - <div> - {header} - <div - className='video-div embed-responsive-item' - onClick={this.play} - > - {content} + <div + className='post__embed-container' + > + <div> + {header} + <div + className='video-div embed-responsive-item' + onClick={this.play} + > + {content} + </div> </div> </div> ); |