From db5c7aba788c5f0a1a347f7d68baa5f0b1c5f516 Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Mon, 14 Aug 2023 22:11:38 +0800 Subject: [PATCH] fix: #2615 scrollbar jitter under certain message counts --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index a99f72f15..f661d0a47 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -940,7 +940,7 @@ function _Chat() { const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE; const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE; - if (isTouchTopEdge) { + if (isTouchTopEdge && !isTouchBottomEdge) { setMsgRenderIndex(prevPageMsgIndex); } else if (isTouchBottomEdge) { setMsgRenderIndex(nextPageMsgIndex);