diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-09-29 07:54:55 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-09-29 07:54:55 -0400 |
commit | c17310d011da851fbfb16e66274639791f939740 (patch) | |
tree | 26b5db93eb13594772053e88b23e01f9f49a8ae1 /web/react/components/post_list.jsx | |
parent | 7d36aa55da66f5610c5293106cbf7e6ca08a0da9 (diff) | |
download | chat-c17310d011da851fbfb16e66274639791f939740.tar.gz chat-c17310d011da851fbfb16e66274639791f939740.tar.bz2 chat-c17310d011da851fbfb16e66274639791f939740.zip |
Fix scrolling related to RHS.
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r-- | web/react/components/post_list.jsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 3e1e075bb..a31967257 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -128,6 +128,15 @@ export default class PostList extends React.Component { this.userHasSeenNew = true; } this.isUserScroll = true; + + $('.top-visible-post').removeClass('top-visible-post'); + + $(React.findDOMNode(this.refs.postlistcontent)).children().each(function select() { + if ($(this).position().top + $(this).height() / 2 > 0) { + $(this).addClass('top-visible-post'); + return false; + } + }); }); $('.post-list__content div .post').removeClass('post--last'); @@ -665,7 +674,10 @@ export default class PostList extends React.Component { className={'post-list-holder-by-time ' + activeClass} > <div className='post-list__table'> - <div className='post-list__content'> + <div + ref='postlistcontent' + className='post-list__content' + > {moreMessages} {postCtls} </div> |