Skip to content

Commit

Permalink
Fixed bug: Addressed issues with reply and edit comment features in t…
Browse files Browse the repository at this point in the history
…he comment section. (#1680)
  • Loading branch information
kr-2003 authored Jan 22, 2024
1 parent 0195edb commit d3b0b6d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions website/static/js/issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ $(function () {

$('body').on('click', '.edit_comment', function (e) {
e.preventDefault();
comment_id = $(this).attr('name');
old_message = $(this).parent().next().next().text();
$(this).parent().next().show();
$(this).parent().next().find('textarea').val(old_message);
comment_id = $(this).attr('name');
$(this).hide();
$(this).next('.edit_comment').hide();
$(this).next('.del_comment').hide();
$(this).parent().next().next().hide();
$(this).parent().next().find('textarea').val(old_message);
$(this).parent().parent().next().show();
});

$(document).on('click', '.edit_form button[type="submit"]', function (e) {
Expand All @@ -113,10 +113,7 @@ $(function () {
$('body').on('click', '.reply_comment', function (e) {
e.preventDefault();
comment_id = $(this).attr('name');
$(this).hide();
$(this).next('.edit_comment').hide();
$(this).next().next('.del_comment').hide();
$(this).parent().parent().next().show();
$(this).parent().parent().parent().next().toggle();
});

$(document).on('click', '.reply_form button[type="submit"]', function (e) {
Expand Down

0 comments on commit d3b0b6d

Please sign in to comment.