python / python/peps

Investigate scroll-offset management issues on pages with sticky banner

Aperta
#3,065 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@pradyunsg ci sta già lavorando.

Dal 20/3/2023.

infra
Lingua principale
reStructuredText
Stelle
5k
Fork
1.8k
Merge medio
2g 4h
PR unite (30g)
25

Descrizione

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 DOMContentLoaded and 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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.