summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/components/edit_post_modal.jsx2
-rw-r--r--webapp/components/textbox.jsx4
2 files changed, 6 insertions, 0 deletions
diff --git a/webapp/components/edit_post_modal.jsx b/webapp/components/edit_post_modal.jsx
index b2b607428..902b18d30 100644
--- a/webapp/components/edit_post_modal.jsx
+++ b/webapp/components/edit_post_modal.jsx
@@ -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);
diff --git a/webapp/components/textbox.jsx b/webapp/components/textbox.jsx
index 7f3dc1891..21f784af5 100644
--- a/webapp/components/textbox.jsx
+++ b/webapp/components/textbox.jsx
@@ -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.