@dorilama good news to share, i got it working!
@Anna.fae if you’d like to implement in your project, perhaps this will help.
in the below, i have an element named ‘chatHistory’ which contains the collection. on submit, i call the below workflow which causes the user to drop to most recent message since we’re showing a loading indicator. thanks for your feedback, @dorilama . very helpful and appreciate your support.
function scrollToBottom() {
var chatHistory = wwLib.getFrontDocument().getElementById("chatHistory");
var lastMessage = chatHistory.lastElementChild;
if (lastMessage) {
lastMessage.scrollIntoView({ behavior: 'smooth', block: 'end' });
}
}
scrollToBottom();