Investigate scroll-offset management issues on pages with sticky banner
@pradyunsg is already working on this.
Since Mar 20, 2023.
- Dominant language
- reStructuredText
- Stars
- 5k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 25
Description
In testing this, sometimes when loading a page with a fragment identifier (the original scenario motivating this change), at least for me in FF on Windows, the scroll offset isn't applied and the banner covers the heading, which I'm guessing is because the scroll event races this snippit on
DOMContentLoadedand sometimes the scroll is executed before the scroll offset has been set.
Originally posted by @CAM-Gerlach in https://github.com/python/peps/pull/2992#pullrequestreview-1276259998
Decided to defer the detailed investigation into this for a follow-up change -- this is an issue for tracking either the change of issuing an additional scroll event or using a different mechanism (eg: something render-blocking) to set the scroll offset instead or some other way to avoid the occasional race condition.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.