迁移聊天室底部滚动工具

This commit is contained in:
2026-04-25 19:47:26 +08:00
parent 62bd92c1c6
commit c8a9c92b56
3 changed files with 36 additions and 2 deletions
@@ -1770,6 +1770,11 @@
* 将公聊窗口滚动到最新消息(受 autoScroll 开关控制)
*/
function scrollToBottom() {
if (window.ChatRoomTools?.scrollChatToBottom) {
window.ChatRoomTools.scrollChatToBottom(container, () => autoScroll);
return;
}
if (autoScroll) {
container.scrollTop = container.scrollHeight;
}