Skip to content

Commit a794b59

Browse files
authored
navigator: also track comments visible in viewport (#2482)
1 parent 5f697f3 commit a794b59

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

components/use-comments-navigator.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ export function useCommentsNavigator () {
6262
window.requestAnimationFrame(() => {
6363
if (!commentRef?.current || !commentRef.current.isConnected) return
6464

65-
// don't track this new comment if it's visible in the viewport
66-
const rect = commentRef.current.getBoundingClientRect()
67-
if (rect.top >= 0 && rect.bottom <= window.innerHeight) return
68-
6965
// dedupe
7066
const existing = commentRefs.current.some(item => item.ref.current === commentRef.current)
7167
if (existing) return

0 commit comments

Comments
 (0)