Skip to content

Commit

Permalink
Bug 711655 - 'reply' JS should insert at caret position
Browse files Browse the repository at this point in the history
r=dylan
  • Loading branch information
Anamika_07 authored and dylanwh committed Oct 11, 2016
1 parent d9ba51c commit b0f5a16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function replyToComment(id, real_id, replyto_header, text) {

/* <textarea id="comment"> */
var textarea = document.getElementById('comment');
if (textarea.value != replytext) {
textarea.value += replytext;
if (!textarea.value.startsWith(replytext)) {
textarea.value = replytext+"\n"+textarea.value;
}

textarea.focus();
Expand Down

0 comments on commit b0f5a16

Please sign in to comment.