mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
What was happening is that if you un-narrowed immediately after receiving a message (e.g. because you just sent it), the autoscroll animation from the zfilt table would still be running after you return to the home view, resulting in the viewport being scrolled to an apparently random point in the home view (even though the pointer was still in the right place). This cancels the autoscroll animations whenever you do one of: (1) hashchange (e.g. to go to the settings page) (2) select a message (covers narrowing/unnarrowing as well as keyboard hotkeys) (3) mousewheel scroll since those are basically the cases where we set the viewport scrolltop directly. Arguably this should instead be something where we somehow detect which scroll events are triggered by what and cancel for any scroll event not from the animation or rererendering, but that seems hard. (imported from commit f776021303404c87b36241c733b3d1bcb083163b)
16 KiB
16 KiB