Mobile: Last torrent in list blocked by menubar #2353
Replies: 1 comment
|
The reason it behaves differently depending on how fast you scroll is that the visibility logic only looks at direction, never at position. From const threshold = 10if (Math.abs(scrollY - lastScrollY.current) < threshold) {
ticking.current = false
return
}
if (scrollY > lastScrollY.current) {
setIsFooterVisible(false) // Hide on scroll down
} else {
setIsFooterVisible(true) // Show on scroll up
}There's no reference to That's what produces your flicker. When you arrive at the bottom gently, the container rubber-bands as it settles — The fix is to give it a notion of "at the bottom", since once you're there the bar has nothing left to uncover: const atBottom = scrollContainer.scrollTop + scrollContainer.clientHeight
>= scrollContainer.scrollHeight - threshold
if (atBottom) {
setIsFooterVisible(false)
} else if (scrollY > lastScrollY.current) {
...That also fixes it for anyone whose device does more aggressive overscroll than yours, which is probably why this hasn't been reported more often — the bounce distance varies a lot between browsers and platforms, and on some it never crosses the 10px threshold at all. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
When scrolling down your list of torrents the menubar always appears (it goes away if scrolling up). However, if you scroll really fast to get to the bottom the menubar stays hidden.
Screen recording:
https://github.com/user-attachments/assets/d28a5163-28d3-4156-bf4f-0f93d4a5494e
In a scenario where you have 100 torrents, and you are scrolled 80 down, you can quickly scroll to the bottom and there's no issue as the menubar doesn't appear and you can click on the last one. However if you were scrolled to e.g 95/100 then scroll to the last one the menubar will keep appearing and disappearing over the top of the last torrent making it impossible to select.
Steps to reproduce
No response
Environment
Relevant logs
No response
Checklist
All reactions