summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-29 07:54:55 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-29 07:54:55 -0400
commitc17310d011da851fbfb16e66274639791f939740 (patch)
tree26b5db93eb13594772053e88b23e01f9f49a8ae1 /web/react/components/post_list.jsx
parent7d36aa55da66f5610c5293106cbf7e6ca08a0da9 (diff)
downloadchat-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.jsx14
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>