reset text-area size after commenting
parent
ee8635ef63
commit
108e7781ea
|
@ -199,6 +199,7 @@ function comment_edit(id){
|
||||||
|
|
||||||
function postComment(fullname, hide){
|
function postComment(fullname, hide){
|
||||||
const btn = document.getElementById('save-reply-to-'+fullname)
|
const btn = document.getElementById('save-reply-to-'+fullname)
|
||||||
|
const textArea = document.getElementById('reply-form-body-'+fullname)
|
||||||
btn.disabled = true
|
btn.disabled = true
|
||||||
btn.classList.add('disabled');
|
btn.classList.add('disabled');
|
||||||
|
|
||||||
|
@ -206,7 +207,7 @@ function postComment(fullname, hide){
|
||||||
|
|
||||||
form.append('formkey', formkey());
|
form.append('formkey', formkey());
|
||||||
form.append('parent_fullname', fullname);
|
form.append('parent_fullname', fullname);
|
||||||
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
|
form.append('body', textArea.value);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (const e of document.getElementById('file-upload-reply-'+fullname).files)
|
for (const e of document.getElementById('file-upload-reply-'+fullname).files)
|
||||||
|
@ -243,6 +244,7 @@ function postComment(fullname, hide){
|
||||||
document.getElementById('charcount-'+fullname).innerHTML = ''
|
document.getElementById('charcount-'+fullname).innerHTML = ''
|
||||||
document.getElementById('filename-show-reply-' + fullname).innerHTML = '<i class="fas fa-file"></i>';
|
document.getElementById('filename-show-reply-' + fullname).innerHTML = '<i class="fas fa-file"></i>';
|
||||||
document.getElementById('file-upload-reply-'+fullname).value = null;
|
document.getElementById('file-upload-reply-'+fullname).value = null;
|
||||||
|
autoExpand(textArea);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showToast(false, getMessageFromJsonData(false, data));
|
showToast(false, getMessageFromJsonData(false, data));
|
||||||
|
|
Loading…
Reference in New Issue