diff --git a/services/web/app/views/project/editor/review-panel.jade b/services/web/app/views/project/editor/review-panel.jade index 2646932ad2..03454b92a8 100644 --- a/services/web/app/views/project/editor/review-panel.jade +++ b/services/web/app/views/project/editor/review-panel.jade @@ -204,7 +204,8 @@ script(type='text/ng-template', id='commentEntryTemplate') button.rp-entry-button( ng-click="onReply();" ng-if="permissions.comment" - ng-disabled="!entry.replyContent.length") + ng-disabled="!entry.replyContent.length" + ) i.fa.fa-reply |  Reply @@ -284,10 +285,15 @@ script(type='text/ng-template', id='addCommentEntryTemplate') focus-on="comment:new:open" ) .rp-entry-actions - a.rp-entry-button(href, ng-click="cancelNewComment();") + button.rp-entry-button( + ng-click="cancelNewComment();" + ) i.fa.fa-times |  Cancel - a.rp-entry-button(href, ng-click="submitNewComment()") + button.rp-entry-button( + ng-click="submitNewComment()" + ng-disabled="!state.content.length" + ) i.fa.fa-comment |  Comment diff --git a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee index 7f41f00fa5..124794e7b8 100644 --- a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee +++ b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee @@ -27,8 +27,9 @@ define [ scope.handleCommentKeyPress = (ev) -> if ev.keyCode == 13 and !ev.shiftKey and !ev.ctrlKey and !ev.metaKey ev.preventDefault() - ev.target.blur() - scope.submitNewComment() + if scope.state.content.length > 0 + ev.target.blur() + scope.submitNewComment() scope.submitNewComment = () -> scope.onSubmit { content: scope.state.content } diff --git a/services/web/public/coffee/ide/review-panel/directives/commentEntry.coffee b/services/web/public/coffee/ide/review-panel/directives/commentEntry.coffee index 63a20c2243..db54574d27 100644 --- a/services/web/public/coffee/ide/review-panel/directives/commentEntry.coffee +++ b/services/web/public/coffee/ide/review-panel/directives/commentEntry.coffee @@ -18,7 +18,7 @@ define [ scope.handleCommentReplyKeyPress = (ev) -> if ev.keyCode == 13 and !ev.shiftKey and !ev.ctrlKey and !ev.metaKey ev.preventDefault() - if scope.entry.length > 0 + if scope.entry.replyContent.length > 0 ev.target.blur() scope.onReply()