mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user