pl-fe: workaround for thread scroll position

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-11 22:39:18 +02:00
parent 053520de2e
commit d74cc52098

View file

@ -299,7 +299,15 @@ const Thread: React.FC<IThread> = ({
offset: -146,
});
setTimeout(() => statusRef.current?.querySelector<HTMLDivElement>('.detailed-actualStatus')?.focus(), 0);
// TODO: Actually fix this
setTimeout(() => {
scroller.current?.scrollToIndex({
index: ancestorsIds.size,
offset: -146,
});
setTimeout(() => statusRef.current?.querySelector<HTMLDivElement>('.detailed-actualStatus')?.focus(), 0);
}, 0);
}, [status.id, ancestorsIds.size]);
const handleOpenCompareHistoryModal = (status: Pick<Status, 'id'>) => {