[bug]: autoScroll behavior on message-scroller
bug
### Describe the bug
i think it's a bug anyway. Basically if i set autoScroll on the `MessageScrollerProvider` then it no longer sends a new message to the top of the viewport. I want both behaviors - new message goes to top of view and, unless the user intervenes, stream follows the live edge.
### Affected component/components
message-scroller
### How to reproduce
new message goes to top of viewport, but it will no longer treat the chat as being at the live edge.
```jsx
<MessageScrollerProvider
defaultScrollPosition="end"
scrollPreviousItemPeek={0}
scrollMargin={8}
>
<Chat {...props} />
</MessageScrollerProvider>
```
new message does not go to top of viewport, but follows the stream at the live edge.
```jsx
<MessageScrollerProvider
autoScroll
defaultScrollPosition="end"
scrollPreviousItemPeek={0}
scrollMargin={8}
>
<Chat {...props} />
</MessageScrollerProvider>
```
### Codesandbox/StackBlitz link
_No response_
### Logs
```bash
```
### System Info
```bash
mac, chrome, "@shadcn/react": "^0.2.0"
```
### Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
0 条评论