From 3c5dd6a5e7054777abadce82577b137144b27805 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 4 Apr 2014 15:56:17 -0400 Subject: [PATCH] small tweak to reply with text selected --- public/src/forum/topic/postTools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/forum/topic/postTools.js b/public/src/forum/topic/postTools.js index 05b859d770..36243dad79 100644 --- a/public/src/forum/topic/postTools.js +++ b/public/src/forum/topic/postTools.js @@ -74,12 +74,12 @@ define(['composer', 'share'], function(composer, share) { } } - var username = getUserName(button); + var username = getUserName(selectionText ? $(selection.baseNode) : button); if (selectionText.length) { composer.addQuote(tid, getPid(button), topicName, username, selectionText); } else { - composer.newReply(tid, getPid(button), topicName, username + ' '); + composer.newReply(tid, getPid(button), topicName, username ? username + ' ' : ''); } }