microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.59k stars 1.54k forks source link

Clicking on 'New message' always scrolls to bottom of the most recent card. It should be customizable #5119

Open swarnava112 opened 6 months ago

swarnava112 commented 6 months ago

Is your feature request related to a problem?

yes. When clicking on the 'New message' button, the windows always scrolls to the bottom of the latest chat. It would be of great help if this behaviour is customizable

Describe the suggestion or request in detail

https://github.com/microsoft/BotFramework-WebChat/blob/512cc60a95bd54f8e7eb54574b6869ff3deca351/packages/component/src/Utils/scrollIntoViewWithBlockNearest.ts#L8

This behaviour should be customizable, as in the dev can control the scroll position to either top or bottom of the intented target.

Describe alternatives you have considered

No response

Additional context

No response

compulim commented 6 months ago

Interesting.

image

Yes, it seems the button will always scroll to end (scrollToEnd({ behavior: 'smooth' })). I remember we have something called "unread activity" and we should be able to customize the behavior to scroll to that activity.