You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When my bot provides an answer or provides a set of response cards, the message list shows the end of the last communication causing the user to have to scroll back up to read the beginning of the response. How do I get the focus to stick on the beginning of the response instead of the end of it?
I'm getting this:
When I want this:
The text was updated successfully, but these errors were encountered:
I wonder if I could add some auto-scrolling Java script to the file that controls the messaging display. Something like:
// Add this function to handle auto-scrolling
const scrollToTop = () => {
const chatContainer = document.querySelector('.lex-web-ui-chat-container');
if (chatContainer) {
const lastMessage = chatContainer.querySelector('.lex-web-ui-message:last-child');
if (lastMessage) {
lastMessage.scrollIntoView({ behavior: 'smooth', block: 'start' }); // Scrolls to the top of the new message
}
}
};
// Call the scrollToTop function whenever a new message is added
const handleNewMessage = (message) => {
// Existing logic for adding messages to the DOM
renderMessage(message);
// Scroll to the top of the new message
scrollToTop();
};
If you think this is feasible, which file(s) would need to be manipulated?
When my bot provides an answer or provides a set of response cards, the message list shows the end of the last communication causing the user to have to scroll back up to read the beginning of the response. How do I get the focus to stick on the beginning of the response instead of the end of it?
I'm getting this:
When I want this:
The text was updated successfully, but these errors were encountered: