peps icon indicating copy to clipboard operation
peps copied to clipboard

Investigate scroll-offset management issues on pages with sticky banner

Open pradyunsg opened this issue 2 years ago • 1 comments

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.

pradyunsg avatar Mar 20 '23 08:03 pradyunsg

FWIW, I've not been able to reproduce this personally.

pradyunsg avatar Mar 20 '23 08:03 pradyunsg