python / python/peps

Investigate scroll-offset management issues on pages with sticky banner

Abierto
#3,065 1 comentario 0 reacciones 1 asignado Ver en GitHub

@pradyunsg ya está trabajando en esto.

Desde el 20/3/2023.

infra
Lenguaje dominante
reStructuredText
Estrellas
5k
Forks
1.8k
Merge medio
2 d 4 h
PR fusionados (30 d)
25

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.