Description
Describe the bug
Several of my fellow Mumblers updated to an unstable build a few days ago to get access to stereo support and apparently some bugfixes related to image pasting, and we noticed that sometimes autoscrolling doesn't behave well when images are pasted.
Usually, if A pastes an image, and whether B's scrollbar is scrolled down as much as possible or not, B's chat view will scroll further down (to the bottom), bringing the image into view. However, sometimes, B's chat view will scroll to a (seemingly) arbitrary point in the chat view. This "abitrary" point always seems to be the same point, once this starts happening.
Steps to Reproduce
Steps to reproduce the behavior:
- Join a server with two clients.
- Start pasting images (e.g. by copying them from a browser and pasting them in the chat box input using Ctrl-V) and observe the behavior.
Because this doesn't always happen, I understand this may not be easily reproducible. It seems to happen about half of the time. Sometimes it randomly fixes itself and several pastes will work fine, and it might break again at some other point.
I've (unsuccessfully) tried pinpointing the exact thing that makes this occur:
- Images of various widths and heights, but nope.
- Clearing the chat view when this starts happening, also nope.
Expected behavior
When someone says something or pastes an image:
- Was it you? Then always jump to the bottom.
- Was it someone else?
- Is your scrollbar already at the bottom? Move further to the bottom after inserting the text or image.
- Is your scrollbar not at the bottom? Maintain it in such a way that your viewport stays the same and you can keep reading what you were reading and are not forced down every time.
Desktop (please complete the following information):
- OS: Arch Linux 64-bit for me, Windows 10 for my fellow Mumblers.
- Version:
master
at commit c5b5c12 (1.4.0 dev). This also still appears to happen on commits of a couple of days ago.
Additional context
May be related to or a regression of #1258 or #1969.