-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix: skip-to-content scroll behavior #2401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @jhildenbiddle , could plz more details on it? (Much thx that if you could provide a screenshot/recording) As per the early discuss and my understanding, thats what I did: On the |
@Koooooo-7 -- I've added descriptions and videos demonstrating the bug and the fix to PR summary (above). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and nice experience improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good job!
Summary
Fixes an issue the new (unreleased) "Skip to Content" link that caused an immediate jump to to the content (instead scrolling) and the main content to scroll down (instead of being static) into place.
Example of bug (develop branch preview w/ Chrome 123)
The incorrect behavior is the result of three separate things occurring at the same time:
Example-Bug.mp4
Example of fix (PR changes w/ Chrome 123)
The fix if simple thanks to modern APIs: set the
preventScroll
option totrue
when calling the browser's nativefocus()
method:Example-fix.mp4
Related issue, if any:
None
What kind of change does this PR introduce?
Bugfix
For any code change,
N/A
Does this PR introduce a breaking change?
No
Tested in the following browsers: