mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #734 from mattermost/plt-206
PLT-206 Fix first channel load scrolling issue on Windows and iOS and add emoji to RHS.
This commit is contained in:
@@ -35,9 +35,7 @@ export default class PostBody extends React.Component {
|
||||
|
||||
parseEmojis() {
|
||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||
this.getAllChildNodes(React.findDOMNode(this)).forEach((current) => {
|
||||
global.window.emojify.run(current);
|
||||
});
|
||||
global.window.emojify.run(React.findDOMNode(this.refs.message_span));
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@@ -161,6 +159,7 @@ export default class PostBody extends React.Component {
|
||||
>
|
||||
{loading}
|
||||
<span
|
||||
ref='message_span'
|
||||
onClick={TextFormatting.handleClick}
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.state.message)}}
|
||||
/>
|
||||
|
||||
@@ -83,6 +83,7 @@ export default class PostList extends React.Component {
|
||||
};
|
||||
}
|
||||
componentDidMount() {
|
||||
window.onload = () => this.scrollToBottom();
|
||||
if (this.props.isActive) {
|
||||
this.activate();
|
||||
this.loadFirstPosts(this.props.channelId);
|
||||
|
||||
@@ -56,6 +56,7 @@ export default class RhsComment extends React.Component {
|
||||
}
|
||||
parseEmojis() {
|
||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||
global.window.emojify.run(React.findDOMNode(this.refs.message_holder));
|
||||
}
|
||||
componentDidMount() {
|
||||
this.parseEmojis();
|
||||
@@ -208,6 +209,7 @@ export default class RhsComment extends React.Component {
|
||||
<p className={postClass}>
|
||||
{loading}
|
||||
<div
|
||||
ref='message_holder'
|
||||
onClick={TextFormatting.handleClick}
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
||||
/>
|
||||
|
||||
@@ -20,6 +20,7 @@ export default class RhsRootPost extends React.Component {
|
||||
}
|
||||
parseEmojis() {
|
||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||
global.window.emojify.run(React.findDOMNode(this.refs.message_holder));
|
||||
}
|
||||
componentDidMount() {
|
||||
this.parseEmojis();
|
||||
@@ -148,6 +149,7 @@ export default class RhsRootPost extends React.Component {
|
||||
</ul>
|
||||
<div className='post-body'>
|
||||
<div
|
||||
ref='message_holder'
|
||||
onClick={TextFormatting.handleClick}
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user