Custom timeline scroll
Historically timeline has been fixed to the body element as it was having default scroll behaviour. This MR allow to have different scroll parent (like #content
div) and somehow simplifies closest status search logic. It also allows to utilize virtualScrollingIndex better if virtual scrolling is enabled.
For example, this is how default scroll parent (body) looks like. Scrollbar is covering navbar, as the whole body content is scrollable:
In comparison, that's what custom scrollParent allows to do - scrollbar is pinned to the timeline content only and is padded against navbar:
Diff somehow looks broken, but it works™. To test:
- Set
useWindow = false
- Set
overflow-y: hidden !important;
style onbody
- Set
overflow-y: scroll;
on#content
- This will look a bit off since other changes are needed to properly offset navbar, but should be enough for testing the concept.
Edited by Pleroma User