mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-1990 Closed markdown preview when edit post modal is closed (#5921)
This commit is contained in:
committed by
Joram Wilander
parent
364543c05b
commit
4092836c94
@@ -184,6 +184,8 @@ export default class EditPostModal extends React.Component {
|
||||
}
|
||||
|
||||
onModalHide() {
|
||||
this.refs.editbox.hidePreview();
|
||||
|
||||
if (this.state.refocusId !== '') {
|
||||
setTimeout(() => {
|
||||
const element = $(this.state.refocusId).get(0);
|
||||
|
||||
@@ -157,6 +157,10 @@ export default class Textbox extends React.Component {
|
||||
this.setState({preview: !this.state.preview});
|
||||
}
|
||||
|
||||
hidePreview() {
|
||||
this.setState({preview: false});
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (nextProps.channelId !== this.props.channelId) {
|
||||
// Update channel id for AtMentionProvider.
|
||||
|
||||
Reference in New Issue
Block a user