Turn off "preview" mode after adding comment (#12127)

* tooltips 1.0.1

* tooltips 1.0.1

* .
This commit is contained in:
ludwiczakpawel 2021-01-05 15:23:45 +01:00 committed by GitHub
parent 8d7642f504
commit 6f65aff143
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,6 +236,7 @@ function handleCommentSubmit(event) {
else if (mainCommentsForm) {
var mainCommentsForm = document.getElementById("new_comment");
mainCommentsForm.classList.remove("submitting");
mainCommentsForm.classList.remove('preview-open');
const textArea = form.getElementsByClassName("comment-textarea")[0];
textArea.closest('.comment-form').classList.remove('comment-form--initiated');
textArea.value = newComment.comment_template || "";