forked from GNUsocial/gnu-social
Fix for removing the first occurance of the duplicate nickname in
textarea when NoticeReply() is used.
This commit is contained in:
parent
468252ee6a
commit
534d0d804c
@ -257,10 +257,10 @@ function NoticeReply() {
|
||||
function NoticeReplySet(nick,id) {
|
||||
rgx_username = /^[0-9a-zA-Z\-_.]*$/;
|
||||
if (nick.match(rgx_username)) {
|
||||
replyto = "@" + nick + " ";
|
||||
var text = $("#notice_data-text");
|
||||
if (text.length) {
|
||||
text.val(replyto + text.val());
|
||||
replyto = "@" + nick + " ";
|
||||
text.val(replyto + text.val().replace(RegExp(replyto, 'i'), ''));
|
||||
$("#form_notice input#notice_in-reply-to").val(id);
|
||||
if (text.get(0).setSelectionRange) {
|
||||
var len = text.val().length;
|
||||
|
Loading…
Reference in New Issue
Block a user