From 1254e8f4d8c2d563c328db3c27c0cd269b82f806 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Tue, 30 Aug 2022 01:05:12 -0700 Subject: [PATCH] snap bounds in virtual list --- .../src/session/conversation/virtualList/VirtualList.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/web/src/session/conversation/virtualList/VirtualList.jsx b/net/web/src/session/conversation/virtualList/VirtualList.jsx index 5395205f..09bd3118 100644 --- a/net/web/src/session/conversation/virtualList/VirtualList.jsx +++ b/net/web/src/session/conversation/virtualList/VirtualList.jsx @@ -109,16 +109,16 @@ export function VirtualList({ id, items, itemRenderer, loadMore }) { const range = getContainerRange(); if (range.bottom - range.top < state.listHeight) { if (scrollTop.current + state.listHeight != range.bottom) { - list.current.scrollTo({ top: range.bottom - state.listHeight, left: 0, behavior: 'smooth' }); + list.current.scrollTo({ top: range.bottom - state.listHeight, left: 0 }); actions.latch(); } } else if (scrollTop.current + state.listHeight > range.bottom) { - list.current.scrollTo({ top: range.bottom - state.listHeight, left: 0, behavior: 'smooth' }); + list.current.scrollTo({ top: range.bottom - state.listHeight, left: 0 }); actions.latch(); } else if (scrollTop.current < range.top) { - list.current.scrollTo({ top: range.top, left: 0, behavior: 'smooth' }); + list.current.scrollTo({ top: range.top, left: 0 }); } } }, pushDelay);