summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index 09741706c..d2f64a266 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -115,6 +115,10 @@ export default class CreatePost extends React.Component {
e.preventDefault();
}
+ if (this.state.uploadsInProgress.length > 0 || this.state.submitting) {
+ return;
+ }
+
const post = {};
post.file_ids = [];
post.message = this.state.message;
@@ -493,7 +497,9 @@ export default class CreatePost extends React.Component {
return;
}
- const lastPostEl = document.getElementById(this.state.channelId + 'commentIcon0');
+ const latestNonEphemeralPost = PostStore.getLatestNonEphemeralPost(this.state.channelId);
+ const latestNonEphemeralPostId = latestNonEphemeralPost == null ? '' : latestNonEphemeralPost.id;
+ const lastPostEl = document.getElementById(`commentIcon_${this.state.channelId}_${latestNonEphemeralPostId}`);
if (!e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey && e.keyCode === KeyCodes.UP && this.state.message === '') {
e.preventDefault();
@@ -761,7 +767,7 @@ export default class CreatePost extends React.Component {
<ConfirmModal
title={notifyAllTitle}
message={notifyAllMessage}
- confirmButton={notifyAllConfirm}
+ confirmButtonText={notifyAllConfirm}
show={this.state.showConfirmModal}
onConfirm={this.handleNotifyAllConfirmation}
onCancel={this.handleNotifyModalCancel}