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.
Этот коммит содержится в:
@@ -35,9 +35,7 @@ export default class PostBody extends React.Component {
|
|||||||
|
|
||||||
parseEmojis() {
|
parseEmojis() {
|
||||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||||
this.getAllChildNodes(React.findDOMNode(this)).forEach((current) => {
|
global.window.emojify.run(React.findDOMNode(this.refs.message_span));
|
||||||
global.window.emojify.run(current);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@@ -161,6 +159,7 @@ export default class PostBody extends React.Component {
|
|||||||
>
|
>
|
||||||
{loading}
|
{loading}
|
||||||
<span
|
<span
|
||||||
|
ref='message_span'
|
||||||
onClick={TextFormatting.handleClick}
|
onClick={TextFormatting.handleClick}
|
||||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.state.message)}}
|
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.state.message)}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ export default class PostList extends React.Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
window.onload = () => this.scrollToBottom();
|
||||||
if (this.props.isActive) {
|
if (this.props.isActive) {
|
||||||
this.activate();
|
this.activate();
|
||||||
this.loadFirstPosts(this.props.channelId);
|
this.loadFirstPosts(this.props.channelId);
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export default class RhsComment extends React.Component {
|
|||||||
}
|
}
|
||||||
parseEmojis() {
|
parseEmojis() {
|
||||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||||
|
global.window.emojify.run(React.findDOMNode(this.refs.message_holder));
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.parseEmojis();
|
this.parseEmojis();
|
||||||
@@ -208,6 +209,7 @@ export default class RhsComment extends React.Component {
|
|||||||
<p className={postClass}>
|
<p className={postClass}>
|
||||||
{loading}
|
{loading}
|
||||||
<div
|
<div
|
||||||
|
ref='message_holder'
|
||||||
onClick={TextFormatting.handleClick}
|
onClick={TextFormatting.handleClick}
|
||||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export default class RhsRootPost extends React.Component {
|
|||||||
}
|
}
|
||||||
parseEmojis() {
|
parseEmojis() {
|
||||||
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE});
|
||||||
|
global.window.emojify.run(React.findDOMNode(this.refs.message_holder));
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.parseEmojis();
|
this.parseEmojis();
|
||||||
@@ -148,6 +149,7 @@ export default class RhsRootPost extends React.Component {
|
|||||||
</ul>
|
</ul>
|
||||||
<div className='post-body'>
|
<div className='post-body'>
|
||||||
<div
|
<div
|
||||||
|
ref='message_holder'
|
||||||
onClick={TextFormatting.handleClick}
|
onClick={TextFormatting.handleClick}
|
||||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user