From 4d71356e527b3c338eb9ff3da6e3e8e29b57cdbc Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 30 Mar 2016 17:34:31 +1100 Subject: [PATCH] FIX: quoting a section inside expanded reply misattributed 1. expand "in reply to" 2. select text 3. quote reply Was incorrectly attributed to parent post --- .../discourse/widgets/embedded-post.js.es6 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 b/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 index 767044ccb9c..d36ef748bd1 100644 --- a/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 +++ b/app/assets/javascripts/discourse/widgets/embedded-post.js.es6 @@ -27,14 +27,16 @@ export default createWidget('embedded-post', { html(attrs, state) { return [ - h('div.row', [ - this.attach('post-avatar', attrs), - h('div.topic-body', [ - h('div.topic-meta-data', [ - this.attach('poster-name', attrs), - this.attach('post-link-arrow', { above: state.above, shareUrl: attrs.shareUrl }) - ]), - new RawHtml({html: `
${attrs.cooked}
`}) + h('div.reply', {attributes: {'data-post-id': attrs.id}}, [ + h('div.row', [ + this.attach('post-avatar', attrs), + h('div.topic-body', [ + h('div.topic-meta-data', [ + this.attach('poster-name', attrs), + this.attach('post-link-arrow', { above: state.above, shareUrl: attrs.shareUrl }) + ]), + new RawHtml({html: `
${attrs.cooked}
`}) + ]) ]) ]) ];