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:
Robin Ward 2019-05-13 11:26:20 -04:00
parent 7326ddea6d
commit fb1da53dff

View File

@ -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();