UX: Make sticky avatars behavior consistent (#27223)
Previously, avatars would be 'sticky' when: 1. The post was longer than the viewport OR 2. You were scrolling up The difference in behavior based on scroll direction doesn't 'feel' quite right. This commit makes the behavior consistent, so sticky avatar logic is applied to all posts regardless of scroll direction.
This commit is contained in:
parent
61c6d2a7fc
commit
b6cc95a0e1
|
@ -122,14 +122,7 @@ export default class StickyAvatars extends Modifier {
|
|||
return;
|
||||
}
|
||||
|
||||
const postContentHeight =
|
||||
entry.target.querySelector(".contents")?.clientHeight;
|
||||
if (
|
||||
this.direction === "⬆️" ||
|
||||
postContentHeight > window.innerHeight - offset
|
||||
) {
|
||||
entry.target.classList.add(STICKY_CLASS);
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue