Skip to content

Fix infinite scroll example: intersect trigger not firing#82

Open
dienhoa wants to merge 1 commit intoAnswerDotAI:mainfrom
dienhoa:fix/infinite_scroll
Open

Fix infinite scroll example: intersect trigger not firing#82
dienhoa wants to merge 1 commit intoAnswerDotAI:mainfrom
dienhoa:fix/infinite_scroll

Conversation

@dienhoa
Copy link
Contributor

@dienhoa dienhoa commented Feb 19, 2026

The infinite scrolling doesn't work. Scrolling to the bottom of the page doesn't trigger intersect once.

According to the Intersection Observer API:

Note that it's possible to have a zero intersection rectangle, which can happen if the intersection is exactly along the boundary between the two or the area of boundingClientRect is zero. This state of the target and root sharing a boundary line is not considered enough to be considered transitioning into an intersecting state.

So it's more reliable to have a div with a real area (by giving it height) to trigger intersect.

@jph00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments