vue-advanced-chat
vue-advanced-chat copied to clipboard
Scrollbar glitch
Describe the bug
The scrollbar when switching between rooms has a glitch
Steps to reproduce
- Use eg. https://codesandbox.io/s/vac-switchroomscrollbarglitch-42u1uc?file=/src/App.vue which has two rooms with a different amount of messages.
- Switch between these rooms (multiple times and check scrollbar)
- You will see that the scrollbar will be displayed at the top and shortly afterwards jumps to the bottom
Expected behavior
It would be nice when the scrollbar would be directly be visible at the bottom of the chats view.
Screenshots
Device (please complete the following information)
OS: Windows 11
Browser: Chrome 103, Firefox 102
Package version: 1.5.5
Additional context
You need to set the messages prop inside the timeout:
setTimeout(() => {
this.messages = Object.assign([], msgs);
this.messagesLoaded = true;
}, 0);
That doesn't make any difference 🤔. I have updated the sandbox.