Don't insert extra whitespace in queetbox.

This commit is contained in:
Joshua Judson Rosen 2014-11-28 22:29:18 -05:00
parent 8ad46d8534
commit 96867c8983
2 changed files with 4 additions and 4 deletions

View File

@ -1090,7 +1090,7 @@ function replyFormHtml(q,qid) {
});
var startText = encodeURIComponent(window.sL.replyTo + ' ' + user_screen_name_html + reply_to_screen_name_html + more_reply_tos + '&nbsp;<br>');
var repliesText = encodeURIComponent(user_screen_name_text + reply_to_screen_name_text + more_reply_tos_text + '&nbsp;&nbsp;');
var repliesText = encodeURIComponent(user_screen_name_text + reply_to_screen_name_text + more_reply_tos_text + '&nbsp;');
return '<div class="inline-reply-queetbox"><span class="inline-reply-caret"><span class="caret-inner"></span></span><img class="reply-avatar" src="' + $('#user-avatar').attr('src') + '" /><div class="queet-box queet-box-syntax" id="queet-box-' + qid + '" data-start-text="' + startText + '" data-replies-text="' + repliesText + '">' + decodeURIComponent(startText) + '</div><div class="syntax-middle"></div><div class="syntax-two" contenteditable="true"></div><div class="mentions-suggestions"></div><div class="queet-toolbar toolbar-reply"><div class="queet-box-extras"><button class="upload-image"></button><button class="shorten disabled">URL</button></div><div class="queet-button"><span class="queet-counter"></span><button>' + window.sL.queetVerb + '</button></div></div></div>';
}

View File

@ -1641,11 +1641,11 @@ $('body').on('click contextmenu','.queet-box-syntax',function () {
$(this)[0].addEventListener("paste", stripHtmlFromPaste);
if(typeof $(this).attr('data-replies-text') != 'undefined') {
$(this).html(decodeURIComponent($(this).attr('data-replies-text')));
var repliesLen = decodeURIComponent($(this).attr('data-replies-text')).length-11;
var repliesLen = decodeURIComponent($(this).attr('data-replies-text')).length-5;
setSelectionRange($(this)[0], repliesLen, repliesLen);
}
else {
$(this).html('&nbsp;');
$(this).html('');
}
$(this).trigger('input');
}
@ -2536,4 +2536,4 @@ $('body').on('click','#mini-edit-profile-button, #edit-profile-header-link',func
$('.edit-profile-button').trigger('click');
},true);
}
});
});