From fb1da53dff8e01ea2f8f992dc6f7975d3a91729a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 13 May 2019 11:26:20 -0400 Subject: [PATCH] FIX: Issue with incorrect heights when cloaking plugin content in posts We noticed this with the house ads plugin. It inserted content after a post, which was not taken into account when calculating and memoizing the height of the element. Co-authored-by: nlalonde Co-authored-by: pmusaraj --- app/assets/javascripts/discourse/widgets/post-stream.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/post-stream.js.es6 b/app/assets/javascripts/discourse/widgets/post-stream.js.es6 index 0515d8e3fe..da059dc964 100644 --- a/app/assets/javascripts/discourse/widgets/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-stream.js.es6 @@ -34,7 +34,7 @@ export function cloak(post, component) { return; } - const $post = $(`#post_${post.post_number}`); + const $post = $(`#post_${post.post_number}`).parent(); _cloaked[post.id] = true; _heights[post.id] = $post.outerHeight();