fix docs scrolling up while typing#9713
Open
stephdin wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #9602
The issue was the
scroll-padding-topon 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.