Browse Source

Check if reply comment box already exists

merge-requests/45/head
Bauke 7 years ago
parent
commit
a4553f2bc4
No known key found for this signature in database GPG Key ID: C1C0F29952BCF558
  1. 4
      tildes/static/js/behaviors/comment-reply-button.js

4
tildes/static/js/behaviors/comment-reply-button.js

@ -25,6 +25,10 @@ $.onmount('[data-js-comment-reply-button]', function() {
var postURL = '/api/web/comments/' + parentCommentID + '/replies'; var postURL = '/api/web/comments/' + parentCommentID + '/replies';
var markdownID = 'markdown-reply-' + parentCommentID; var markdownID = 'markdown-reply-' + parentCommentID;
if ($('#' + markdownID).length) {
return;
}
var replyForm = document.createElement('form'); var replyForm = document.createElement('form');
replyForm.setAttribute('method', 'post'); replyForm.setAttribute('method', 'post');
replyForm.setAttribute('autocomplete', 'off'); replyForm.setAttribute('autocomplete', 'off');

Loading…
Cancel
Save