FIX: stop injecting uneeded margin (#28335)

This commit is contained in:
Sam 2024-08-13 16:11:16 +10:00 committed by GitHub
parent c1f6ec3019
commit 1fa3eb3f2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 12 deletions

View File

@ -83,18 +83,6 @@ export default class StickyAvatars extends Modifier {
schedule("afterRender", () => { schedule("afterRender", () => {
this.element.querySelectorAll(TOPIC_POST_SELECTOR).forEach((postNode) => { this.element.querySelectorAll(TOPIC_POST_SELECTOR).forEach((postNode) => {
this.intersectionObserver.observe(postNode); this.intersectionObserver.observe(postNode);
const topicAvatarNode = postNode.querySelector(".topic-avatar");
if (!topicAvatarNode || !postNode.querySelector("#post_1")) {
return;
}
const topicMapNode = postNode.querySelector(".topic-map");
if (!topicMapNode) {
return;
}
topicAvatarNode.style.marginBottom = `${topicMapNode.clientHeight}px`;
}); });
}); });
} }