diff --git a/addons/website_forum/static/src/js/website_forum.share.js b/addons/website_forum/static/src/js/website_forum.share.js
index f849fe7ada4..0545d775a81 100644
--- a/addons/website_forum/static/src/js/website_forum.share.js
+++ b/addons/website_forum/static/src/js/website_forum.share.js
@@ -47,12 +47,17 @@ var ForumShare = publicWidget.registry.socialShare.extend({
* @private
*/
_render: function () {
+ var $question = this.$('article.question');
if (!this.targetType) {
this._super.apply(this, arguments);
} else if (this.targetType === 'social-alert') {
- $('.row .question').before(qweb.render('website.social_alert', {medias: this.socialList}));
+ $question.before(qweb.render('website.social_alert', {medias: this.socialList}));
} else {
- $('body').append(qweb.render('website.social_modal', {medias: this.socialList, target_type: this.targetType}));
+ $('body').append(qweb.render('website.social_modal', {
+ medias: this.socialList,
+ target_type: this.targetType,
+ state: $question.data('state'),
+ }));
$('#oe_social_share_modal').modal('show');
}
},
diff --git a/addons/website_forum/static/src/xml/website_forum_share_templates.xml b/addons/website_forum/static/src/xml/website_forum_share_templates.xml
index 205b05d9011..e1ef8d75194 100644
--- a/addons/website_forum/static/src/xml/website_forum_share_templates.xml
+++ b/addons/website_forum/static/src/xml/website_forum_share_templates.xml
@@ -13,7 +13,7 @@