mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update reply-quote-preview.tsx
This commit is contained in:
@@ -74,9 +74,9 @@ const scrollToThreadCardTop = (threadCid: string) => {
|
||||
const scrollToReplyOnPage = (cid: string) => {
|
||||
const el = document.querySelector<HTMLElement>(`[data-cid="${cid}"][data-post-cid]`);
|
||||
if (!el) return false;
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
document.querySelectorAll('.scroll-highlight').forEach((prev) => prev.classList.remove('scroll-highlight'));
|
||||
el.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
el.classList.add('scroll-highlight');
|
||||
setTimeout(() => el.classList.remove('scroll-highlight'), 2000);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user