Node.js based forum software built for the modern web
closes #1316
barisusaklicc3150ff092b
diff --git a/public/src/forum/topic/postTools.js b/public/src/forum/topic/postTools.jsindex 399095b9c0..05b859d770 100644--- a/public/src/forum/topic/postTools.js+++ b/public/src/forum/topic/postTools.js@@ -69,15 +69,19 @@ define(['composer', 'share'], function(composer, share) {if ($(selection.baseNode).parents('.post-content').length > 0) {var snippet = selection.toString();- if (snippet.length > 0) {- selectionText = '> ' + snippet.replace(/\n/g, '\n> ');+ if (snippet.length) {+ selectionText = '> ' + snippet.replace(/\n/g, '\n> ') + '\n\n';}}var username = getUserName(button);- username += username ? ' ' : '';- composer.newReply(tid, getPid(button), topicName, selectionText.length > 0 ? selectionText + '\n\n' + username : '' + username);+ if (selectionText.length) {+ composer.addQuote(tid, getPid(button), topicName, username, selectionText);+ } else {+ composer.newReply(tid, getPid(button), topicName, username + ' ');+ }+}function onQuoteClicked(button, tid, topicName) {