Skip to content

fix docs scrolling up while typing#9713

Open
stephdin wants to merge 1 commit into
roc-lang:mainfrom
stephdin:fix-scrolling-issues-in-docs
Open

fix docs scrolling up while typing#9713
stephdin wants to merge 1 commit into
roc-lang:mainfrom
stephdin:fix-scrolling-issues-in-docs

Conversation

@stephdin

@stephdin stephdin commented Jun 19, 2026

Copy link
Copy Markdown

This fixes #9602

The issue was the scroll-padding-top on the scroll container made the browser think the sticky search bar was "hidden", triggering a scroll on every keystroke.

This PR moves the offset from the scroll container (scroll-padding) to the anchor targets (scroll-margin) which fixes the focus-scroll loop.

scroll-padding-top on the main scroll container caused Chromium to
repeatedly scroll up during text input and selection in the search
bar. The sticky search form sits at top:0 of the scrollport, inside
the padding zone, so the browser's focus-visibility check sees it as
obscured and scrolls on every keystroke.

Replace it with scroll-margin-top on .entry and .entry-group elements,
which provides the same offset for anchor-link navigation without
affecting focus management.
@stephdin stephdin changed the title fix docs scrolling up when while typing fix docs scrolling up while typing Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing in docs search causes scroll up

1 participant