refresh comment textarea on edit - fixes edge case

master
Aevann1 2022-12-03 07:27:47 +02:00
parent fa0bb57253
commit f28ae7cca1
2 changed files with 2 additions and 1 deletions

View File

@ -178,6 +178,7 @@ function comment_edit(id){
document.getElementById('cancel-edit-'+id).click()
bs_trigger(commentForm);
document.getElementById('filename-edit-reply-' + id).innerHTML = '<i class="fas fa-file"></i>';
document.getElementById('comment-edit-body-' + id).value = data["body"];
}
else {
showToast(false, getMessageFromJsonData(false, data));

View File

@ -462,7 +462,7 @@ def edit_comment(cid, v):
g.db.add(n)
g.db.commit()
return {"comment": c.realbody(v)}
return {"body": body, "comment": c.realbody(v)}
@app.post("/delete/comment/<cid>")