diff --git a/tildes/static/js/behaviors/comment-reply-button.js b/tildes/static/js/behaviors/comment-reply-button.js index 016a0b9..d3e4905 100644 --- a/tildes/static/js/behaviors/comment-reply-button.js +++ b/tildes/static/js/behaviors/comment-reply-button.js @@ -25,6 +25,11 @@ $.onmount('[data-js-comment-reply-button]', function() { var postURL = '/api/web/comments/' + parentCommentID + '/replies'; var markdownID = 'markdown-reply-' + parentCommentID; + if ($('#' + markdownID).length > 0) { + $('#' + markdownID).focus(); + return; + } + var replyForm = document.createElement('form'); replyForm.setAttribute('method', 'post'); replyForm.setAttribute('autocomplete', 'off');