From a794b59b91b0537506e72c38ae32286458e7a35d Mon Sep 17 00:00:00 2001 From: soxa <6390896+Soxasora@users.noreply.github.com> Date: Thu, 4 Sep 2025 00:41:36 +0200 Subject: [PATCH] navigator: also track comments visible in viewport (#2482) --- components/use-comments-navigator.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/use-comments-navigator.js b/components/use-comments-navigator.js index cb5aeba9..d425e977 100644 --- a/components/use-comments-navigator.js +++ b/components/use-comments-navigator.js @@ -62,10 +62,6 @@ export function useCommentsNavigator () { window.requestAnimationFrame(() => { if (!commentRef?.current || !commentRef.current.isConnected) return - // don't track this new comment if it's visible in the viewport - const rect = commentRef.current.getBoundingClientRect() - if (rect.top >= 0 && rect.bottom <= window.innerHeight) return - // dedupe const existing = commentRefs.current.some(item => item.ref.current === commentRef.current) if (existing) return