I would use a client hook on the container of chat messages. Set a scroll event on mounted
, that sets a flag if user scrolls to the end of messages. In updated
, check the flag, if yes, scroll to the bottom (which means user was already at the bottom of messages, probably waiting for new ones), if no then do not scroll.
I do have the same kind of problem, but I’ve not yet implemented it. This is the logic I’m gonna use, so it may have flaws or implementation details. I’ll be happy if you share the end result!