FIX: stop injecting uneeded margin (#28335)
This commit is contained in:
parent
c1f6ec3019
commit
1fa3eb3f2a
|
@ -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`;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue