From d1cb115ada0c32bac9a37cc7265b35e9bc78d708 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 6 Aug 2022 16:04:34 +0200 Subject: [PATCH] fix comment editting bug --- files/assets/js/comments_v.js | 4 ++-- files/templates/comments.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 012197a7f..12ea7dce2 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -191,7 +191,7 @@ function comment_edit(id){ commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '') document.getElementById('cancel-edit-'+id).click() bs_trigger(commentForm); - document.getElementById('filename-show-reply-t2_' + id).innerHTML = ''; + document.getElementById('filename-edit-reply-' + id).innerHTML = ''; } else { if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"]; @@ -201,7 +201,7 @@ function comment_edit(id){ setTimeout(() => { btn.disabled = false; btn.classList.remove('disabled'); - }, 2000); + }, 1000); } xhr.send(form) } diff --git a/files/templates/comments.html b/files/templates/comments.html index 6c0ff049b..5474c5668 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -864,7 +864,7 @@ {% if v %} - + {% endif %}