mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-5077: Fix floating date on mobile view. (#5061)
This commit is contained in:
committed by
Corey Hulen
parent
99cf08ac38
commit
b6cafd5981
@@ -250,7 +250,11 @@ export default class Post extends React.Component {
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
ref={(div) => {
|
||||
this.domNode = div;
|
||||
}}
|
||||
>
|
||||
<div
|
||||
id={'post_' + post.id}
|
||||
className={'post ' + sameUserClass + ' ' + compactClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass + ' ' + hideControls + ' ' + dropdownOpenedClass}
|
||||
|
||||
@@ -159,7 +159,7 @@ export default class PostList extends React.Component {
|
||||
const id = this.props.postList.order[i];
|
||||
const element = this.refs[id];
|
||||
|
||||
if (!element || element.offsetTop + element.clientHeight <= this.refs.postlist.scrollTop) {
|
||||
if (!element || !element.domNode || element.domNode.offsetTop + element.domNode.clientHeight <= this.refs.postlist.scrollTop) {
|
||||
// this post is off the top of the screen so the last one is at the top of the screen
|
||||
let topPostId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user