metafizzy / metafizzy/infinite-scroll

prefill loads data endlessly when container has display:none

Open
#979 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
7.5k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/metafizzy/infinite-scroll/blob/370f7863ab61e6917a53b419649eb51254d8ffeb/js/page-load.js#L264
If container has display:none, then this.element.clientHeight is always 0.
So prefill never stops.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at js/page-load.js around line 264 and inspect how prefill uses this.element.clientHeight to decide whether loading should stop. Reproduce the issue with the container set to display:none, then verify that prefill no longer loads endlessly and still stops normally for visible containers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.