Skip to content

Node.js based forum software built for the modern web

dont use toPid if "topic/reply" is clicked

barisusakli5634c5417cad
diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js
index 2492b300b6..b3f6ebace2 100644
--- a/public/src/client/topic/postTools.js
+++ b/public/src/client/topic/postTools.js
@@ -146,12 +146,15 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
if (getData(button, 'data-uid') === '0') {
username = '';
}
+
+ var toPid = button.is('[component="post/reply"]') ? getData(button, 'data-pid') : null;
+
if (selectionText.length) {
$(window).trigger('action:composer.addQuote', {
tid: tid,
slug: ajaxify.data.slug,
index: getData(button, 'data-index'),
- pid: getData(button, 'data-pid'),
+ pid: toPid,
topicName: topicName,
username: username,
text: selectionText
@@ -159,7 +162,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
} else {
$(window).trigger('action:composer.post.new', {
tid: tid,
- pid: getData(button, 'data-pid'),
+ pid: toPid,
topicName: topicName,
text: username ? username + ' ' : ''
});