mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
We've been getting reports for a few months of folks coming back to their Zulip window after a night's sleep and finding it scrolled to the bottom, past dozens or hundreds of messages that they haven't read. Oddly, the pointer is actually still located where it should be (verifiable by hitting the Up key), but it's too late: everything below gets marked as read because bottom_whitespace is in view. There's only a few places in the zulip codebase where we scroll the page down, and this is the main one of them. My best theory for what could be happening is that the browser is, in its overnight power-saving mode, not granting the Zulip window the resources to actually repaint the early scrolls. This, in turn, would cause scrolling down to happen that is not limited by the need to keep the pointer in view. I don't think that this fully closes the issue; ideally, we'd have a reproducer and much more precise detection logic for this situation, but it should mostly resolve the problem with likely no user-facing visible harm.
42 KiB
42 KiB