vue-advanced-chat icon indicating copy to clipboard operation
vue-advanced-chat copied to clipboard

Scrollbar glitch

Open NINI1988 opened this issue 2 years ago • 2 comments

Describe the bug

The scrollbar when switching between rooms has a glitch

Steps to reproduce

  1. Use eg. https://codesandbox.io/s/vac-switchroomscrollbarglitch-42u1uc?file=/src/App.vue which has two rooms with a different amount of messages.
  2. Switch between these rooms (multiple times and check scrollbar)
  3. 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

NINI1988 avatar Jul 17 '22 00:07 NINI1988

You need to set the messages prop inside the timeout:

setTimeout(() => {
  this.messages = Object.assign([], msgs);
  this.messagesLoaded = true;
}, 0);

antoine92190 avatar Jul 19 '22 05:07 antoine92190

That doesn't make any difference 🤔. I have updated the sandbox.

NINI1988 avatar Aug 02 '22 19:08 NINI1988