diff options
author | Anamika_07 <h2014313059@hyderabad.bits-pilani.ac.in> | 2016-10-12 00:56:07 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2016-10-12 00:56:07 +0200 |
commit | b0f5a16ece2ae97d5ebec0c36aed4f965b162398 (patch) | |
tree | 2818661ba91be34b3ebe5fc5921f7ac5a646d1ea /js | |
parent | d9ba51c35e379110795c08ee6f7dee3acfec1a59 (diff) | |
download | bugzilla-b0f5a16ece2ae97d5ebec0c36aed4f965b162398.tar.gz bugzilla-b0f5a16ece2ae97d5ebec0c36aed4f965b162398.tar.xz |
Bug 711655 - 'reply' JS should insert at caret position
r=dylan
Diffstat (limited to 'js')
-rw-r--r-- | js/comments.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/comments.js b/js/comments.js index 30baf53f4..0cc4fb9eb 100644 --- a/js/comments.js +++ b/js/comments.js @@ -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(); |