Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed same text on comment reply form #9509

Merged
merged 5 commits into from
May 17, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/views/comments/create.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ let fileUploadElements = [
isButton: true
}
]);
$('textarea#text-input-reply-<%= @comment.cid %>').val("");
<% else %>
// new comment IS a reply to another comment
// no other elements need upload functionality
$('#comment-<%= @comment.reply_to %>-reply-toggle').before('<%= escape_javascript(render :partial => "notes/comment", :locals => {comment: @comment, answer_id: @answer_id}) %>')
$('textarea#text-input-reply-<%= @comment.reply_to %>').val("");
<% end %>
// create image upload functionality for fresh comment's elements
// see editorToolbar.js
Expand Down