chatscope / chat-ui-kit-react

Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
https://chatscope.io
MIT License
1.34k stars 116 forks source link

MessageList gradually scrolling out of view when new message is received #124

Open jordanshardy opened 1 year ago

jordanshardy commented 1 year ago

Hey, thanks for your work, awesome package.

Having a small issue where a new message is received, the last message on MessageList is gradually scrolling out of focus.

Here is the example video: https://www.loom.com/share/9d42356201e945559963cfe717e16506

Here is the code, pretty straight forward so I don't think it's something with the props:

   <MessageList
            ref={msgListRef}
            scrollBehavior="auto"
            onYReachStart={
              hasMoreMessages &&
              !isLoadingMessages &&
              typeof onLoadMore === 'function'
                ? onLoadMore
                : undefined
            }
            {...messageListProps}>
            <MessageList.Content>
            </MessageList.Content>
   </MessageList>

Curious if anyone else is having this issue and what I can do to solve it.

Thanks!

supersnager commented 9 months ago

@yordanshardy I'm not sure but it may be due to custom message styling. Unfortunately managing sticky scroll is quite complicated, so it is impossible to debug with just a video and a simple example. If the problem still occurs please provide a repro.