mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:20:43 +08: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:
parent
7326ddea6d
commit
fb1da53dff
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user