summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_comment.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r--webapp/components/create_comment.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index 616257f37..6cd2054a1 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -225,11 +225,11 @@ class CreateComment extends React.Component {
}
if ((e.ctrlKey || e.metaKey) && !e.altKey && !e.shiftKey && e.keyCode === KeyCodes.UP) {
- e.preventDefault();
const lastPost = PostStore.getCurrentUsersLatestPost(this.props.channelId, this.props.rootId);
- if (!lastPost) {
+ if (!lastPost || this.state.messageText !== '') {
return;
}
+ e.preventDefault();
let message = lastPost.message;
if (this.state.lastMessage !== '') {
message = this.state.lastMessage;